how to ensure overwriting of eps graphics files? [message #53397] |
Sun, 15 April 2007 12:04  |
swingnut
Messages: 30 Registered: September 2005
|
Member |
|
|
Ah, the never-ending challenges of working in IDL. I just discovered a
little while ago, while continuing to develop code for my
dissertation, that IDL will write a new postscript file if none
exists. Great. But in the process of debugging, setting reasonable
ranges for plotting, adding and removing items from various plots,
etc, I've stumbled upon an odd behavior whereby IDL is not overwriting
existing eps files with the updated plots. (I discovered this because
I changed something that altered which of the plots gets overwritten
based on the analysis.)
Is there a way to force IDL to overwrite an existing graphics file
every time?
|
|
|
Re: how to ensure overwriting of eps graphics files? [message #53504 is a reply to message #53397] |
Wed, 18 April 2007 04:58  |
Paolo Grigis
Messages: 171 Registered: December 2003
|
Senior Member |
|
|
swingnut@gmail.com wrote:
> I've pretty much resolved this issue. I've found an error and made a
> couple of changes, but mainly the issue was the behavior cause be
> having a logarithmic axis. Setting /ylog or /xlog seems to force the
> plotting of complete decades, because as soon as I removed it, the
> plots started having calculated axis ranges instead of complete
> decades. I suspect that plot does something along the lines of "Oh,
> you want decades? Ok, let's see which ones your data falls in, ok here
> ya go, all decades containing data."
>
You have to add ystyle=1 to force exact yrange for plots
(either for log or linear plots).
Ciao,
Paolo
|
|
|
Re: how to ensure overwriting of eps graphics files? [message #53506 is a reply to message #53397] |
Wed, 18 April 2007 02:39  |
swingnut
Messages: 30 Registered: September 2005
|
Member |
|
|
I've pretty much resolved this issue. I've found an error and made a
couple of changes, but mainly the issue was the behavior cause be
having a logarithmic axis. Setting /ylog or /xlog seems to force the
plotting of complete decades, because as soon as I removed it, the
plots started having calculated axis ranges instead of complete
decades. I suspect that plot does something along the lines of "Oh,
you want decades? Ok, let's see which ones your data falls in, ok here
ya go, all decades containing data."
|
|
|
Re: how to ensure overwriting of eps graphics files? [message #53532 is a reply to message #53397] |
Mon, 16 April 2007 08:30  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeff N. writes:
> This is probably a silly question, but why couldn't you just test for
> the existence of that graphics file and delete it before you write out
> your new one? Doesn't that accomplish the same result as overwriting
> an existing file would?
WAY too easy. It would never work!
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: how to ensure overwriting of eps graphics files? [message #53533 is a reply to message #53397] |
Mon, 16 April 2007 07:14  |
Jeff N.
Messages: 120 Registered: April 2005
|
Senior Member |
|
|
> Is there a way to force IDL to overwrite an existing graphics file
> every time?
This is probably a silly question, but why couldn't you just test for
the existence of that graphics file and delete it before you write out
your new one? Doesn't that accomplish the same result as overwriting
an existing file would?
Jeff
|
|
|
Re: how to ensure overwriting of eps graphics files? [message #53534 is a reply to message #53397] |
Mon, 16 April 2007 06:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
swingnut@gmail.com writes:
> Here's a more thorough description of the behavior I observed.
(And he DOES mean thorough!)
OK, I'm going to double up on my bet that it's
programmer error. :-)
Cheers,
David
P.S. Given your way of doing things, IDL must make it
VERY hard to sleep at night, what with all the nightmares.
Good luck finding the problem!
--
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.")
|
|
|