LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pixel color

How can I programmatically change the color of a single point at X-Y plot?
The idea is to plot given set of points with coordinates X,Y and each point
has own color (represented as RGB hex code) given by Z.
Can I solve this problem not resorting the help of picture controls?
0 Kudos
Message 1 of 2
(2,634 Views)
You can NOT have different colors defined for the points of a single plot!

I have made it look that way. These techniques will work if your data set is not to large.

1) Use one plot to draw the line and make sure its point style is "none". Add one additional plot for each point and define the point style as you choose and set the color as you described. When updating the X-Y graph, the first plot goes in as you expect. The other plot should be arrays that are identical to the first plot except all of the Y values are replaced with NaN. This will result in all of the other plots have a sinlge point.

2) You could also use cursors to do this as well.

Both of these approahces will only work if your data set is small.

If your data set is large, then the Co
mponents Works 3-d graph can be adapted to do this.

THen of course you could always use a picture control, but that is not an option.

Trying to help,

Hoping to hear other ideas,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 2
(2,634 Views)