I have a csv file with xy coordinates and an additional column that I want use as color information and set as a color ramp. Below is an example of the data I have:
Edit: if the color ramp was to go from red (highest number) to blue (lowest number) then I want the spheres with counts equal to 20 to be red and the sphere with count equal to 1 to be blue.
This is really close to what I want to do: How do I import XYZ AND a fourth parameter that adds color to my objects?, but I'm not familiar enough with python to get all the way to the end.
This is what I have so far, any help would be appreciated!
with open("example.csv") as f: reader = csv.reader(f) for i, row in enumerate(reader): if i==0: continue x, y = row[0:2] bpy.ops.mesh.primitive_uv_sphere_add( location = ( float(x), float(y), 0 ) )