[matplotlib-devel] bbox of eps backend : test needed

Thanks. With this new script, I get only one failure:

xpdf_False

This is on RHEL5 x86_64:

gs 8.15.2
gv 3.6.8
pdftops 3.00

Cheers,
Mike

···

On 11/16/2010 06:54 AM, Jae-Joon Lee wrote:

On Mon, Nov 15, 2010 at 11:29 PM, Michael Droettboom<mdroe@...86...> wrote:
   

How do I verify if the bbox is correct? Displaying them with gs, some of them have the plot centered on what looks to be a letter-sized page, and others are at the bottom, but none of them seem to be cropped. I'm happy to give a full detailed report, just not sure what I'm looking for in terms of right/wrong :wink:

Thanks,
Mike

Michael,

Here is a slightly modified example.

import matplotlib.pyplot as plt

fig = plt.figure()
plt.plot([0, 1, 1, 0], [0, 0, 1, 1], "ro", ms=10, transform=fig.transFigure,
          clip_on=False)

for distiller in ["False", "xpdf", "ghostscript"]:
    for usetex in ["True", "False"]:
        plt.rcParams["ps.usedistiller"]=distiller
        plt.rcParams["text.usetex"]=usetex

        plt.savefig("test_bbox_%s_%s.eps" % (distiller, usetex))

With this, you should see four red circles (a quadrant of a circle) at
the four corner of page boundaries.
I don't think "gs" is a right tool to test if the bbox is correct. My
experience is that it often ignores the bbox. On linux, you may use
"gv", "evince", or "okular".

Regards,

JJ
   
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA