LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit graph multi color

Hello,
 
Is it possible to draw, on an edit graph, a multi color line ?
 
What I want is to draw a line, but under condition with different colors : green under 50, red above, ...
 
Thanks
0 Kudos
Message 1 of 3
(3,178 Views)

NicoP,

It's possible to draw a multi-colored line on a graph control, but you can't do it off of the edit screen, you will have to do it programatically. I am assuming you wish to make a vertical line that changes colors along the Y axis.  Here is how you might go about it:


 PlotLine (panel, PANEL_GRAPH, 10, 3, 10, 5, VAL_RED); //Set red from 3 to 5 @ x = 10
 PlotLine (panel, PANEL_GRAPH, 10, 5, 10, 6, VAL_YELLOW); //Set yellow from 5 to 6 @ x = 10
 PlotLine (panel, PANEL_GRAPH, 10, 6, 10, 8, VAL_GREEN);//Set green from 6 to 8 @ x = 10


0 Kudos
Message 2 of 3
(3,156 Views)
Thanks for your answer.


0 Kudos
Message 3 of 3
(3,139 Views)