Re: cgimage not generating output with cgps_open and cgps_close (fine in X window) . [message #89474 is a reply to message #89473] |
Mon, 20 October 2014 11:06   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Well, leave the XSCALE and YSCALE keywords off your cgImage command.
> They aren't needed (cgImage does this automatically), and they are
> somehow (don't understand it yet) screwing things up.
Alright, here is what is happening. This is a combination of the usual
keyword inheritance nonsense, with a little twist from IDL letting you
abbreviate keyword names.
The proper way to set axis properties in cgImage is via the AXKeywords
keyword, which no one can figure out how to use. So I allow a *limited*
number of axis keywords to be used on the cgImage command line (e.g.,
xrange and yrange). I don't forbid you to use XSCALE and YSCALE keywords
(the ol' keyword inheritance problem), but there should be no reason to
use them, either. cgImage knows what it is doing and does axis things
correctly.
Had you actually used XSCALE and YSCALE keywords, instead of their
shorted form XS and YS, you would have received an error message, since
these keywords are passed along to the TV command. They don't mean
anything to the TV command, so the TV command complains. But, in their
shortened form, XS and YS, they are interpreted by the TV command as the
XSIZE and YSIZE keywords, and they will overwrite the XSIZE and YSIZE
values cgImage uses internally to size a PostScript image. (The XSIZE
and YSIZE keywords are only used by the TV command when in the
PostScript device.) As a result, and this is why you weren't getting an
error, your image was being sized to a one-by-one pixel, which was being
displayed correctly in your output. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|