comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » status of PNG and EPS output from Plot Save method in IDL v8.4?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
status of PNG and EPS output from Plot Save method in IDL v8.4? [message #89088] Wed, 23 July 2014 14:00 Go to next message
Paul Van Delst[1] is currently offline  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 #89107 is a reply to message #89088] Thu, 24 July 2014 15:38 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
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.

But I agree it shouldn't be us that has to figure this out. I would prefer if the on-screen canvas were sized to exactly match a printed page by default.

Craig
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 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: writing a variable in a netcdf 4 with IDL
Next Topic: writing different file to a single file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:40:49 PDT 2025

Total time taken to generate the page: 0.00642 seconds