Selective plotting of values in waves
epiphenom
If I have one column of data consisting of either 0 or 1 how can I make a plot of only the 1s in each column while still preserving the space in the time axis so that the whenever there is a 0 igor will not plot this point but will keep the gap in time and move on to the next point to check if it is a 0 or 1 etc....
Thanks for your time
modifygraph mask(tracename)={wavewithzeroesandones, 1, 1}
The first 1 says to include the points in "waveswithzeroesandones" that are equal the the given value. The second 1 is the given value.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 25, 2013 at 08:54 am - Permalink
October 25, 2013 at 02:38 pm - Permalink
I guess that you mean to create a wave having all the values where the one wave has 1's. That would be the Extract operation. Something like
Extract/O datawave, newwave, wavewithonesandzeroes == 1
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 28, 2013 at 09:42 am - Permalink
The screenshot shows what I would like as a wave and the original wave.
October 28, 2013 at 10:38 am - Permalink
NewWave = NewWave[p]==0 ? NaN : NewWave[p]
Hope this helps,
Kurt
October 29, 2013 at 12:11 am - Permalink
If you would like to extract just the desired data, and your original data is waveform data (the X values are encoding in the Y data wave using the X scaling) then you would need to create an XY pair. You might do something like:
newXData = x
Extract/O dataYwave, newYwave, wavewithonesandzeroes == 1
Extract/O dataXwave, newXData, wavewithonesandzeroes == 1
There are other ways to do this; probably one of our very clever customers could come up with something more efficient :)
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 29, 2013 at 09:19 am - Permalink
October 29, 2013 at 01:06 pm - Permalink