comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » turn a string value into variable name
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: turn a string value into variable name [message #94471 is a reply to message #63122] Thu, 01 June 2017 15:48 Go to previous messageGo to previous message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
So now I want to do this in order to use a loop to add lines to a plot and then make a legend. I need the plot names to all be different so I can use them in the "target" argument, but I can otherwise make the plot commands identical, e.g.,

p1 = plot(xbin, pdf, color = linecolors[nsea], thick = 2, name = seanames[nsea], /overplot)

Based on David's comment, I tried

execute('p5 = plot(xbin, pdf, color = linecolors[nsea-1], thick = 2, name = seanames[nsea-1], /overplot)')

but this didn't do anything except return a "1". I'm really not excited about putting in a plot command (with an 'if' statement' for each of the lines I want to overplot.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL-python bridge issue for MacOS Sierra 10.12.2 (Library not loaded: libpython2.7.dylib)
Next Topic: Image registration

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:43:33 PDT 2025

Total time taken to generate the page: 0.00380 seconds