Plot Clipping Problems [message #43831] |
Thu, 28 April 2005 16:44 |
Sean Davis
Messages: 19 Registered: August 1999
|
Junior Member |
|
|
Hello Folks,
I recently had a problem with clipping and the OPLOT command in IDL. The
problem is basically this... Normally, IDL clips data to the current
plotting window, for example
plot, findgen(20)
oplot, findgen(20)-5, findgen(20)
The above oplot command does not print any data outside of the plot window
established by the first PLOT command. If one wants to show the data
outside the plot window, one can use the command
oplot, findgen(20)-5, findgen(20), /noclip
to see the data outside the window. Now... My IDL 6.1 session normally
handles this fine, but I had a freak occurence just a minute ago where IDL
defaulted to "NOCLIP" mode, and I couldn't figure out how to get it back to
normal clipping (note: explicitly setting the /clip keyword did not work,
and when I used this, IDL did not plot anything).
The freak occurence seemed to be associated with a previous call to
write_png using the keyword /true in the TVRD function, (ie write_png,
filename, tvrd(/true) ) but I am not able to reproduce the error. I have
searched D. Fanning's site and this newsgroup and can't find any mention of
similar problems... Anyone seen stuff like this before?!? In the meantime,
I'll try to find a way to reproduce this problem.
On other notes, *as usual* I find the IDL documentation sorely lacking, and
also in this case, DEAD WRONG!!! Here's a quote from the IDL
documentation, talking about the CLIP Graphics Keyword:
"Coordinates are specified in data units unless an overriding coordinate
unit specification keyword is present (i.e., NORMAL or DEVICE). If the
clipping is provided in data or normalized units, the actual clipping
rectangle is computed by converting those values to device units. The
clipping itself always occurs in device space. "
This is plain wrong! !P.CLIP is defined *device* units, not *data* units,
as they state.
On a personal note, I use exclusively IDL about 90% of my workday, and it is
precisely because of things like this that I don't ever argue with people
who talk trash about IDL.
Cheers,
Sean
|
|
|