Font size appearance in function graphics PNG and EPS output [message #86825] |
Thu, 05 December 2013 11:49  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Hello,
I use function graphics to generate both PNG and EPS output of various
plots. When I create a PNG output like so:
IDL> p.Save, 'myplot.png', HEIGHT=500
the resulting image looks just like the onscreen plot. However, when I
create an EPS file, if I simply do something like
IDL> p.Save, 'myplot.eps'
the size of the fonts (in relation to the rest of the plot) appears to
decrease. As such, to make the text readable in EPS form I find myself
doing silly things like the following:
IDL> font_size = p.font_size
IDL> p.font_size = p.font_size * 2.0
IDL> p.Save, 'myplot.eps'
IDL> p.font_size = font_size
That is, I temporarily increase the size of the font so that they are a
useful size in the final EPS file.
The above example is an annoyance, but in some more complicated plots I
have code like the following:
; ...Output an EPS file
; ......Increase the font size for EPS files
font_size = HASH()
FOR band = 1, n_bands DO BEGIN
osrf[0].Get_Property, band, pRef=p, Debug=debug
font_size[band] = p.font_size
p.font_size = p.font_size * 2.0
ENDFOR
; ......Create the EPS file
w.Save, fileroot+'.eps'
; ......Restore the onscreen font sizes
FOR band = 1, n_bands DO BEGIN
osrf[0].Get_Property, band, pRef=p, Debug=debug
p.font_size = font_size[band]
ENDFOR
I've reached the straw/camel point and am asking this newsgroup if they
know what I'm doing wrong to get this weird font-sizing action in the
first place? Or is the IDL Postscript output just plain busted?
I created two files like so:
IDL> p.save,'test.png',height=500
IDL> p.save,'test.eps'
and have placed them here:
http://ftp.emc.ncep.noaa.gov/jcsda/CRTM/.plots
If you size the EPS file the same as the PNG image you will see the
fonts are proportionally much smaller.
Thanks for any insights.
cheers,
paulv
p.s. In case you were wondering, the EPS files are for documents to
allow people to view the plots in an e-document and retain the ability
to zoom in and view detail (which you don't get with images like PNG).
|
|
|