LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visualize array values on graph

Ok to say the vi which color should be applied for which graph when I have more than one graph in a XY graph.

However how to say the vi to set a color for each point of one graph (how can I access the properties of the graph to set my color table and to change one plot's color, how can I specifiy it from the diagram view, I can access to its index from the diagram but how can I then set the color in the graph ?

Thanks,

 

 

 

0 Kudos
Message 11 of 26
(1,447 Views)

To set the color of a plot programmatically, you can use the property node. Write the index of the plot to the Actual Plot property and the color (for this you can use a color box constant) to the Plot Color property.

Message Edited by becktho on 12-13-2006 10:16 AM

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 12 of 26
(1,443 Views)

Ok please let me know which properties node in the attached file (that represents my menu) I have to use to access to your example (Act Plot and Plot color) ?

Thanks

0 Kudos
Message 13 of 26
(1,434 Views)

Wow - French - a long time since I had it at school.

Actual Plot = Courbe Active

Plot.Color - for this you have to select the entry "Courbe" which should open a new menu. There then should be something like "Couleur".

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 14 of 26
(1,432 Views)

Ok to set the color to the all plot, but I can not fill with a specific color only one element from the plot.

I would like for example in my 1st attached vi select one element and fill it with a green color, but all the element of the XY graph fill with the same color, green !

So in the 2nd file attached I have tried to select one element, however I get error by connecting it to the node property, as if at the entry of Actual plot, it is not an element reprresented by X and Y (the first point of my XY graph) ?

Thanks in advance

 

Download All
0 Kudos
Message 15 of 26
(1,426 Views)

Looking at your vis, I assume that you don't know the LV help system. Pressing Ctrl+H (on Windows) opens the context help, where some information is visible.

In general you may have a look at the LV manual or other How To's - because wiring a cluster-array to a numeric property can not work.

To help you, I attach a simple example. See how it executes in highlighting mode, so you can get an idea of what you have to do.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 16 of 26
(1,407 Views)
Your answer corresponds to set different color to different curve in one XY Graph, but it does not show how to set different color for each point of one curve.
For example, in your example, how we can do to set different color for the 5 points of the green curve (X=1/2/3/4/5 - Y=1.5/1.5/1.5/1.5/1.5)  without plot 5 different curves ?
 
Thanks a lot.
 
 
0 Kudos
Message 17 of 26
(1,381 Views)

As far as I know this is not possible and I think it mostly doesn't make sense.

You can have multiple curves with a different color for each, but one curve with differently colored points - that does not work.

 

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 18 of 26
(1,379 Views)
It does make sense, for example I would like to plot the XY graph (Azimuth and Elevation) by affecting a color depending on the offset value in Azimuth, so for each point I have to set a color table related to the offset value. I do not want to plot 103 different curve of only 1 point.
0 Kudos
Message 19 of 26
(1,376 Views)

Ok - for this purpose it makes sense, but I'm afraid I can't give you a better answer than plotting multiple curves, each containing one point.

Maybe there's one out there who knows more. If plotting multiple curves is not the right way for you, I suggest you opening a new post, asking for a solution for this specific problem.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 20 of 26
(1,374 Views)