Removing vertical lines from error bars quickly
souperman1985
function rmErrBars() // removes error bars from plot
string trl=tracenamelist("",";",1), item
variable items=itemsinlist(trl), i
for(i=0;i<items;i+=1)
item=stringfromlist(i,trl)
ErrorBars $item OFF
endfor
end
string trl=tracenamelist("",";",1), item
variable items=itemsinlist(trl), i
for(i=0;i<items;i+=1)
item=stringfromlist(i,trl)
ErrorBars $item OFF
endfor
end
In order to just remove the lines, this is the code that has to be run:
ErrorBars/L=0/Y=1 waveOnGraph Y,wave=(errorWave,errorWave)
I think what I need is a way to determine what "errorWave" is, given the name "waveOnGraph" or $item in the snit-bit above. Any thoughts/ideas?
Thanks in advance!
In highly nested form, this would do the trick (replace the "0" with "i" in your loop):
October 13, 2016 at 11:20 am - Permalink
October 13, 2016 at 11:29 am - Permalink
Unfortunately, the /T flag comes prior to the /L flag, so putting /L=0 immediately after "ErrorBars" just results in it being overridden by the second /L= flag.
Thoughts?
Thanks again!
October 13, 2016 at 02:47 pm - Permalink
As to my other suggestion of parsing the ErrorBars string which may be more general, you could use the "strsearch" command to find the error waves based on the last comma in the string. For example, if your error bar properties string was "errorstring", you could extract the error bar wave name as
errorwavestring=errorstring[strsearch(errorstring,",",inf,1)+1,strlen(errorstring)-1]
. I didn't test this but you get the idea.October 14, 2016 at 01:29 pm - Permalink
November 3, 2016 at 10:20 am - Permalink