Re: Font size appearance in function graphics PNG and EPS output [message #86870 is a reply to message #86867] |
Mon, 09 December 2013 09:50   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
Hi Paul,
Well, there are a couple of things going on. The PNG assumes that your screen is 96 dots-per-inch, and scales the fonts accordingly. Since EPS is a vector format on a "piece of paper", you need to set your EPS width to match the PNG image width. Something like this:
p.save, 'test.eps', HEIGHT=500.0/96 ; height in inches
However, there is something wrong with our postscript code where it doesn't draw the plot lines correctly, so this isn't going to work, even in IDL 8.3.
I'm not sure if you have to use EPS, but as a possible workaround, you could use PDF output instead. If you do try PDF, you just need to make sure that you set the "paper" width to be the same as the png image. Something like this:
x = DINDGEN(100)
y = (x/10.0d0)^2
p = PLOT(x,y, $
XTITLE='X axis title', $
YTITLE='Y axis title', $
TITLE ='Test plot title', $
FONT_SIZE=10)
p.save, 'test.png', HEIGHT=500
p.save, 'test.pdf', HEIGHT=500.0/96 ; height in inches
I have logged the EPS issues as bug IDL-68997, and marked it for IDL 8.3.1. Sorry about the bug...
-Chris
ExelisVIS
|
|
|