# Define UV coordinates for a curve

I have a file that define some curves and values from 0 to 1 for each point in the curve. I am trying to create a material which uses this values from 0 to 1 as the UV coordinates for a colormap texture so I can see the values from 0 to 1 as colors in Blender.

I have seen several ways of using generated UV coordinates for the curve, but I haven't found any way of using my own data as UV coordinates.

I have tried something like this, but it doesn't work as a SplinePoint doesn't have uv property (or something similar).

    curveData = bpy.data.curves.new('myCurve', type='CURVE')
curveData.dimensions = '3D'
curveData.bevel_resolution = 0
curveData.bevel_depth = 1
curveData.use_uv_as_generated = True

polyline = curveData.splines.new(type='POLY')