[Thread Prev][Thread Next][Index]

Re: [ferret_users] ferret_users: eps-figures produced with pyferret become rotated

Hi Martin, Karl, and Ferret users,

> I am using the latest pyferret build from
> source for opensuse 13.2. I want to produce
> figures for inclusion in latex documents.
> I find that figures with aspect ratio < 1 become
> rotated when saved with the frame-command.

I can think of two workarounds:

1) Rotate the figure within LaTeX:


2) Rotate it using some tool: for example, the "pstops" command has
options to rotate PostScript pages.  There may be tools that work
better if the PostScript file is converted to EPS.

In any case, LaTeX require EPS files, so you want to convert your
PostScript files to EPS using the "ps2eps" command or something

> The PostScript specification requires that the saved image width always be
> less than the image height. For landscape images (where the width is larger
> than the height), the image is suppose to be rotated to meet this
> requirement but include the comment "%PageOrientation: Landscape" to
> indicate the plot needs to be rotated back when shown.  See a third of the
> way down the page at:
> http://cairographics.org/documentation/using_the_postscript_surface/

I think that that is a recommendation by DSC, rather than a
restriction.  You don't have to specify a papersize or page
orientation (Landscape or not).  It's recommended, just in case you
want to print it out.  For plots you don't print out, such a
width-must-be-smaller-than-height restriction doesn't make sense.

One typical use case is to use Ferret plots in presentations or
manuscripts without ever printing them out on physical paper.  So, an
option not to rotate the image would be nice.

> I do see that Encapsulated PostScript can have the width larger than the
> height.  At this time, however, PyFerret only produces PostScript and not
> Encapsulated PostScript.  I could add EPS as another format option, solving
> this problem by actually creating EPS instead of trying to use PS as EPS.
> (This issue has been mentioned to me before.)
> I do notice that evince now does respect this %PageOrientation and shows the
> plot correctly.  I remember older versions did not.  Are you seeing the
> rotated image when importing the plot into a document?

Since page orientation makes sense only for printing, I'm not
surprised there are presentation applications (including LaTeX) that
don't honor PageOrientation.



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement