03-27-2009 03:59 AM
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
Solved! Go to Solution.
03-27-2009 04:22 AM
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
03-27-2009 04:26 AM
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
03-27-2009 04:29 AM
Hi Ritesh,
what do you mean with a single plot (only one indicator)? I mean one graph with different waveforms in it.
Mike
03-27-2009 04:59 AM - edited 03-27-2009 05:01 AM
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
03-27-2009 05:11 AM
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
03-27-2009 05:58 AM
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
03-27-2009 06:13 AM
Such a Cool Idea.
Simply Awesome!
there's always a way to fool around with LabVIEW.
Thanks,
Ritesh
05-27-2010 03:47 AM
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