Re: Is there a way to undo a plot? [message #56154] |
Fri, 05 October 2007 10:57 |
Jim Pendleton, ITT Vi
Messages: 13 Registered: August 2006
|
Junior Member |
|
|
If you're using IDL 6.2 or later, you can grab your command history
buffer, edit any necessary lines, and paste them back to the command
line.
A couple years ago I wrote a handy utility for managing the command history
buffer. It's available at
http://www.ittvis.com/codebank/search.asp?FID=350
When the command history window is in focus, you can edit the text, select
the lines you want to execute and copy them. Then switch focus to the
IDE command line and paste them in for execution.
When you find you have a group of commands that you execute often, paste
them into a .pro file and you've got the start of your very own utility
library.
Jim P.
"mystea" <idllearner@gmail.com> wrote in message
news:1191577059.313766.196290@y42g2000hsy.googlegroups.com.. .
> To myself, one of the attractive features of IDL is its ability to try
> out "what's going to happen" in the terminal mode before writing a
> full program. For example, I can try plotting my data with different
> keywords on screen, figure out which set of keywords does the job,
> then copy them and paste them to my code.
>
> However, sometimes I do make a mistake on a plot. Instead of starting
> the whole plot again(say, my plot is composed of many overplots), I
> only want to undo one step and continue my experiment. Is there anyway
> to do this?
>
> Thank you,
>
> Gene
>
|
|
|
Re: Is there a way to undo a plot? [message #56156 is a reply to message #56154] |
Fri, 05 October 2007 10:21  |
R.G.Stockwell
Messages: 163 Registered: October 2004
|
Senior Member |
|
|
"mystea" <idllearner@gmail.com> wrote in message
news:1191577059.313766.196290@y42g2000hsy.googlegroups.com.. .
> To myself, one of the attractive features of IDL is its ability to try
> out "what's going to happen" in the terminal mode before writing a
> full program. For example, I can try plotting my data with different
> keywords on screen, figure out which set of keywords does the job,
> then copy them and paste them to my code.
I agree, I do the exact same thing, exploring through data. However, I
write
my commands in a small main level program, so I can always reproduce
it, and replot it very easily. I usually save off a copy if there is
something interesting
and increment the filename (datalook1.pro, datalook2.pro).
After getting a handle on the data, I use that code as a template for the
real analysis routines, which are always saved so I can always reproduce a
figure
(for a paper or whatever).
Cheers,
bob
|
|
|
Re: Is there a way to undo a plot? [message #56157 is a reply to message #56156] |
Fri, 05 October 2007 10:08  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mystea writes:
> By the way, David, I am not a big fan of batch file...I just happened
> to be using it because I just learned that new trick. So, please
> please teach me if there is a proper way to undo plots...without batch
> files. :P
Sigh...
You'll have to wait for my next book. But rest assured, it
involves objects and the "UNDO" method. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Is there a way to undo a plot? [message #56158 is a reply to message #56157] |
Fri, 05 October 2007 09:59  |
mystea
Messages: 16 Registered: October 2007
|
Junior Member |
|
|
Thank you guys. I tried the oplot method and it kind of worked. The
only setback is that it also erase a small portion of other plots if
there are intersections between two plots.
By the way, David, I am not a big fan of batch file...I just happened
to be using it because I just learned that new trick. So, please
please teach me if there is a proper way to undo plots...without batch
files. :P
Gene
On Oct 5, 6:37 am, David Fanning <n...@dfanning.com> wrote:
> mystea writes:
>> However, sometimes I do make a mistake on a plot. Instead of starting
>> the whole plot again(say, my plot is composed of many overplots), I
>> only want to undo one step and continue my experiment. Is there anyway
>> to do this?
>
> Sometimes this works OK:
>
> OPLOT, lastthingy, COLOR=!P.BACKGROUND
>
> It's the poor man's way of erasing something.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Is there a way to undo a plot? [message #56166 is a reply to message #56158] |
Fri, 05 October 2007 07:56  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Conor writes:
> Also, I think that if you use the object-oriented graphing routines
> (IDLGR?) you can re-do plots easily. I don't know though, I've never
> used them.
They are rather hard to use in a batch file. ;-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Is there a way to undo a plot? [message #56168 is a reply to message #56166] |
Fri, 05 October 2007 07:24  |
Conor
Messages: 138 Registered: February 2007
|
Senior Member |
|
|
Also, I think that if you use the object-oriented graphing routines
(IDLGR?) you can re-do plots easily. I don't know though, I've never
used them.
On Oct 5, 9:37 am, David Fanning <n...@dfanning.com> wrote:
> mystea writes:
>> However, sometimes I do make a mistake on a plot. Instead of starting
>> the whole plot again(say, my plot is composed of many overplots), I
>> only want to undo one step and continue my experiment. Is there anyway
>> to do this?
>
> Sometimes this works OK:
>
> OPLOT, lastthingy, COLOR=!P.BACKGROUND
>
> It's the poor man's way of erasing something.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Is there a way to undo a plot? [message #56171 is a reply to message #56168] |
Fri, 05 October 2007 06:37  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mystea writes:
> However, sometimes I do make a mistake on a plot. Instead of starting
> the whole plot again(say, my plot is composed of many overplots), I
> only want to undo one step and continue my experiment. Is there anyway
> to do this?
Sometimes this works OK:
OPLOT, lastthingy, COLOR=!P.BACKGROUND
It's the poor man's way of erasing something.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|