status of PNG and EPS output from Plot Save method in IDL v8.4? [message #89088] |
Wed, 23 July 2014 14:00  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Hello,
This question is directed to any IDL folks lurking out there (ChrisT?)
I've recently realised that a great majority of my time spent
programming IDL is making the EPS output of my function graphics plots
look similar to their onscreen version.
I've posted some test plots:
1) This is a screen capture of a plot as it appears onscreen:
p = plot(....)
http://ftp.emc.ncep.noaa.gov/jcsda/CRTM/.plots/atms_npp-12.o nscreen.png
2) This is the plot as it appears after using the Save method:
p.Save, 'atms_npp-12.png', height=600
http://ftp.emc.ncep.noaa.gov/jcsda/CRTM/.plots/atms_npp-12.p ng
3) This is a screen capture of the EPS file display:
p.Save, 'atms_npp-12.eps'
http://ftp.emc.ncep.noaa.gov/jcsda/CRTM/.plots/atms_npp-12.o nscreen-eps.png
4) For completeness, this is the actual EPS file:
http://ftp.emc.ncep.noaa.gov/jcsda/CRTM/.plots/atms_npp-12.e ps
The difference between (1) and (2) has been raised before in this
newsgroup, i.e. the Save-method generated PNG file has jagged lines
compared to onscreen. I trust that'll be fixed in v8.4 (gol durn it!)
But my real beef is the difference in font sizes and appearance between
either (1) or (2) and the EPS output seen in (3).
Is THAT going to be fixed in v8.4?
I waste a lot of time mucking about with EPS output (what actually gets
put into technical documents and articles, not the PNGs), futzing with
font sizes and legend positions, so that they look similar. I'm
obviously anal about it but, dammit, for the price of IDL I shouldn't
have to muck about.
Please someone from Exelis tell me EPS output will be done correctly so
as to match the onscreen look in v8.4.
cheers,
paulv
|
|
|
|
Re: status of PNG and EPS output from Plot Save method in IDL v8.4? [message #89116 is a reply to message #89107] |
Fri, 25 July 2014 06:52  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Craig Markwardt writes:
> IDL sizes everything about a plot with respect to the default font size. This includes the plot margins.
>
> The "problem" comes because IDL treats the on-screen display and the PS pixel sizes as being different. IDL actually thinks the EPS canvas is quite a bit larger than the on-screen canvas (relative to the font size), so the plot box takes up a larger amount of space relative to the fonts.
>
> That's something I tried to address in my PXPERFECT procedure.
>
> If you can find the right scale factor for the font size - or equivalently the right scale factor for the X_SIZE and Y_SIZE, you should be able to get perfect output without tweaking anything else.
I think there is a bit more to it than this. In Coyote Graphics I am
careful to use cgDisplay to create a graphics "window". This will create
a canvas with the same aspect ratio either on the display and in the
PostScript device. A plot, positioned with the POSITION keyword should
take up the same relative amount of space in both devices. But, I still
have to scale the font size to get PostScript output to look like
display output. And, of course, I have to use different scaling factors
for Windows and UNIX computers, as well as for how many plots I am
putting on the display! Sigh...
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.")
|
|
|