LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph plot color

Solved!
Go to solution

Dear all,

is there any way to have multiple colors in a single plot ?

 

here's a brief of what i am trying to do:

a graph is continuously running with a value '0'. when the stimulus is given, the value '1' is shown on the graph(just one value when the stimulus is given) and '-1' when it gets the response. the user sometimes gives response when no stimulus is given. that would be invalid response.

 

so if the response is valid i want to show '-1' as green and if it is an invalid response i want to show '-1' in red.

 

i am attaching the pic of the Graph .

 

how can i achieve that ??

 

Thanks,

Ritesh 

0 Kudos
Message 1 of 9
(3,586 Views)

Hi Ritesh,

you can create a new plot for all your responses, then you can select the color for each plot.

 

Hope it helps.
Mike

0 Kudos
Message 2 of 9
(3,584 Views)

Hi mike,

i want to show them in a single plot.

isn't there any way to change some part of the plot to different color ??

 

Ritesh 

0 Kudos
Message 3 of 9
(3,581 Views)

Hi Ritesh,

what do you mean with a single plot (only one indicator)? I mean one graph with different waveforms in it.

 

Mike

0 Kudos
Message 4 of 9
(3,579 Views)

hi mike,

i attached 1 pic with my 1st post. pls have a look at it.

 

i want to display a single waveform. and want the color of some part of the waveform to be different.

 

I cannot have multiple waveforms as there are space constraints. the height if the graph is really small. so want to show all the information(stimulus,response and invalid response) in a single waveform. 

 

 

Ritesh 

Message Edited by ritesh024 on 03-27-2009 03:31 PM
0 Kudos
Message 5 of 9
(3,576 Views)

Hi Ritesh,

a single waveform can only have one color. Maybe you can use annotations. See the "Programmatically Annotate a Graph.vi" Example to get more information.

 

Mike

Message 6 of 9
(3,563 Views)
Solution
Accepted by topic author LVCoder

MikeS81 wrote:

Hi Ritesh,

a single waveform can only have one color. Maybe you can use annotations. See the "Programmatically Annotate a Graph.vi" Example to get more information.

 

Mike


Correct!

 

So we have to resort to using a second plot to highlight the parts of the plot tht are out of spec.

 

I've used two methods

 

1)

Use second plot that has "naN' values for all points that are in spec and the actual values when out of spec. "NaN' points will not plot so the second plot will only paint when the values are out. Optionally set the "fill collor" of the second plot to "zero" and you will get blobs under that bad resposnses.

 

2)

More work but do what CC suggested in this thread where he uses the "NaN" trick on the first plot as well to shut off the normal plot while the value is out of spec.

 

Have fun!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 9
(3,557 Views)

Such a Cool Idea.

Simply Awesome!

 

there's always a way to fool around with LabVIEW.  :smileyhappy:

 

 

Thanks,

Ritesh 

Message 8 of 9
(3,553 Views)

Hi,

i like to have the overlay plot on my waveform graph if the read string is 00000 which is faulty data.

 

Attach with my vi and data here. Not sure i'm missing something or not.

 

thanks and regards,

Simon

 

Download All
0 Kudos
Message 9 of 9
(3,127 Views)