Make plot with markers using every 10th point?
reepingk
Sat, 05/30/2015 - 03:08 pm
I have a set of data in which the data are very closely spaced, I think something like 1000 data points. I was wondering if it's possible to plot the data using markers (so I don't have to use colors or dashed lines) but only use every 10th or 15th or 20th point. Is that possible without simply making a new wave? How do I do it?
Put the graph into Lines and markers mode and then in modify trace dialog, sparse markers will be an option.
mskip=n Puts a marker on only every nth data point in lines and markers mode (mode=4). Useful for displaying many data points when you want to identify the traces with markers. The maximum value for n is 32767.
If you want to do it in other modes then I think you have to do it manually by creating a new wave.
May 30, 2015 at 03:30 pm - Permalink
Oh it IS in the GUI, it's called "sparse markers" I just hadn't tried "Lines and Markers" because I didn't want the line!
May 30, 2015 at 03:32 pm - Permalink
which allows to plot less but evenly spaced data points from a function / the command line.
Display Data[0,2000;100]
ModifyGraph mode=3
HJ
May 31, 2015 at 02:10 am - Permalink
String sourceName
Prompt sourceName, "Source Wave", popup WaveList("*", ";", "")
Variable factor=10, n=1, count=1, npoints
Prompt factor, "Keep every nth point"
npoints=numpnts($sourceName)
PauseUpdate; Silent 1
Do
If (count!=n*factor)
$sourceName[count]=nan
else
n+=1
endif
count+=1
while (count<=npoints)
End
p.s. the name ReduceErrorBars is a bit misleading. It means reduce the number of points (not the size). It's useful for error waves.
May 31, 2015 at 11:49 am - Permalink