11-29-2010 10:03 AM - edited 11-29-2010 10:03 AM
Hi Everyone ,
Hope everyone is doing good. I have a small problem , I am detecting valleies and peaks of waves , i want the portion which is peak or valley to be in different colour so that user can see them clearly.
I am using waveform graph . I am attaching a picture , in it i have circled the part which i want to be in different colour.
can anyone help ?
Rgs
Omar
Solved! Go to Solution.
11-29-2010 10:23 AM
For each portion of a plot that you desire a unique color you will have to use an unique trace for each portion. The portions of the trace that should not be shown use "NaN" to tell LV to "lift the pen" when drawing that portion.
The extra traces can be added below the rest of your plots and the legend sized to hide those extra plots.
There should be some examples of this found under tags "GUI tricks" or something similar.
Ben
11-29-2010 10:24 AM
No picture attached.
But you can do the following, use two graphs, with two colors, in the first graph you replace the data in the peak with 'NaN' values, the second graph you replace the data outside the peak with NaN values.
Ton
11-29-2010 10:32 AM
Sorry , here is the picture
can anyone attach an example (the example should be in .vi not a png because i use 8.6 and it doesn't supports pngs) . or can anyone direct me to an example ..
Thanks for the helpp
11-30-2010 07:36 AM
The answer was given above. Here it is in picture and VI form (version 8.6.1), alternately coloring the cycles of a sine wave.
This method has the disadvantage of requiring a full data set for every color you want to plot. Alternately, you can break your waveform into different pieces and plot them as separate plots, making sure you set the timestamps correctly. To make this work, you will need to set the graph so it uses timestamps. Right click the graph plot area and unselect Ignore Time Stamp. This will put your X-axis into time formatting. Right click the X-axis and select Formatting.... Pick the formatting you want and you should be good.
11-30-2010 07:50 AM
Thanx guyss 😃
11-30-2010 07:54 AM
Ben
11-30-2010 07:59 AM
thanx ben 😃