Morgan Silverman writes:
> I will certainly take a look at that article. The quality of the output is alright. The problem is I can only save from the graphics window to a postscript and the hardcopy created is different looking then the cgWindow (axis label spacing too close to graph, legend too big, and panel spacing too close). I've tried to save as a Raster File but for some reason nothing is generated and either IDL or my mac actually deletes any previously saved .ps files from cgWindow of
the same name. I think the legend resizing problem might be because I used AL_legend,['1500 m', '2000 m', '2500 m', '3000 m', '3500 m'], psym=[28,28,28,28,28], color=['red', 'blue', 'green', 'cyan', 'magenta'], pos=[0.055,0.96], /norm, charsize=0.85. This seemed to be the only method that worked to produce a legend in each panel though. Is there a better way to do that so it doesn't change size in the hardcopy? Maybe not use normalized positions. Thanks.
You realize, of course, that there is *nothing* like WYSIWYG in IDL,
right? You are using two competely and utterly different display devices
when you draw graphics in a display window and write to a PostScript
file.
That said, Coyote Graphics routines certainly try to create WYSIWYG
displays as much as they can. And, they do a better job of it than
anything else I've seen in IDL. They do this by manipulating such things
as character size and plot and line thickness automatically, but ONLY if
you are not manipulating these things yourself! In other words, if you
let me handle it, I'll do a pretty good job. But, as soon as you start
mucking around with these things, I assume you know what you are doing,
and let you handle it. :-)
Character size is a case in point. When you set your character size to
0.85, that is what you are going to get. But, that means one thing on
the display, and something entirely different in a PostScript file.
Generally speaking, if you want something different from the default,
you will probably have to program it differently, like this:
charsize = (!D.Name EQ 'PS') ? 1.05 : 0.85
Then, you can use your character size in an expression:
cgPlot, data, CHARSIZE=charsize
Positioning things with NORMAL or DATA coordinates is exactly the
*right* thing to do. Don't ever position things with DEVICE coordinates.
I just think you have written your code so that it looks great on the
display, without considering how it will look in PostScript. :-)
Cheers,
David
P.S. By the way, font sizes are handled differently in Coyote Graphics
routines not only by device, but also by machine. Different sizes are
required for Windows as opposed to UNIX computers. See cgDefCharsize for
examples.
--
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.")
|