Skip to content

Something wrong when saving eps with figsize set to a5, etc #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ddale opened this issue Jun 20, 2011 · 2 comments
Closed

Something wrong when saving eps with figsize set to a5, etc #354

ddale opened this issue Jun 20, 2011 · 2 comments
Assignees

Comments

@ddale
Copy link
Contributor

ddale commented Jun 20, 2011

Original report at SourceForge, opened Wed Dec 2 11:03:39 2009

If I set figsize to 8.3, 5.8 or to 5.8, 4.1, i.e. to landscape a5 or a6 (I have not checked the others), than eps saving makes troubles.
Namely bounding box is determined incorrectly and I see only part of my figure with evince (e.g.). If I slightly change figsize, e.g. to 5.8, 4, than everything works fine. You will see an example of a saved a6 in a6.eps and an example of a figure with smaller size in smaller.eps.

SourceForge Comments

On Sat Jun 5 14:41:26 2010, leejjoon wrote:

It only happens when text.usetex==True

I tracked down this to a possible issue in "convert_psfrags" step. Somehow, when figsize of 8.3,5.8 is set, the dvips within the convert_psfrags results in a ps file in landscape, and the final output ends up with a wrong bounding box.

I tried to find a way to prevent the page rotation, but couldn't.

In r8385, I implemented somewhat ad hoc workaround. It checks if the result of convert_psfrags is in landscape, and try to correct it during the pstoeps step.

http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_ps.py?r1=8385&r2=8384&pathrev=8385

Given the ad hoc nature of the workaround, I keep this ticket open. But I'm moving this to a feature request.

-JJ

On Wed Dec 2 11:06:13 2009, sboz wrote:

Yes, my backend is GTKAgg. And here are my settings:
{'agg.path.chunksize': 0,
'axes.axisbelow': True,
'axes.edgecolor': 'black',
'axes.facecolor': 'white',
'axes.formatter.limits': [-3, 3],
'axes.grid': False,
'axes.hold': True,
'axes.labelcolor': 'black',
'axes.labelsize': 12.0,
'axes.linewidth': 1.2,
'axes.titlesize': 12.0,
'axes.unicode_minus': True,
'axes3d.grid': True,
'backend': 'GTKAgg',
'backend_fallback': True,
'cairo.format': 'png',
'contour.negative_linestyle': 'dashed',
'datapath': '/usr/share/matplotlib/mpl-data',
'docstring.hardcopy': False,
'figure.autolayout': False,
'figure.dpi': 120.0,
'figure.edgecolor': 'white',
'figure.facecolor': '0.85',
'figure.figsize': [5.7999999999999998, 4.0999999999999996],
'figure.subplot.bottom': 0.10000000000000001,
'figure.subplot.hspace': 0.20000000000000001,
'figure.subplot.left': 0.125,
'figure.subplot.right': 0.90000000000000002,
'figure.subplot.top': 0.90000000000000002,
'figure.subplot.wspace': 0.20000000000000001,
'font.cursive': ['Zapf Chancery'],
'font.family': 'serif',
'font.fantasy': ['Comic Sans MS',
'Chicago',
'Charcoal',
'ImpactWestern',
'fantasy'],
'font.monospace': ['Computer Modern Typewriter', 'Courier'],
'font.sans-serif': ['Computer Modern Sans Serif', 'Helvetica', 'Avant Garde'],
'font.serif': ['Computer Modern Roman',
'Times',
'Palatino',
'New Century Schoolbook',
'Bookman'],
'font.size': 21.0,
'font.stretch': 'normal',
'font.style': 'normal',
'font.variant': 'normal',
'font.weight': 'normal',
'grid.color': 'black',
'grid.linestyle': ':',
'grid.linewidth': 0.5,
'image.aspect': 'equal',
'image.cmap': 'hot',
'image.interpolation': 'bilinear',
'image.lut': 1024,
'image.origin': 'upper',
'image.resample': False,
'interactive': True,
'legend.borderaxespad': 0.5,
'legend.borderpad': 0.40000000000000002,
'legend.columnspacing': 2.0,
'legend.fancybox': False,
'legend.fontsize': 12.0,
'legend.handlelength': 2.0,
'legend.handletextpad': 0.80000000000000004,
'legend.isaxes': True,
'legend.labelspacing': 0.5,
'legend.loc': 'upper right',
'legend.markerscale': 1.0,
'legend.numpoints': 1,
'legend.shadow': False,
'lines.antialiased': True,
'lines.color': 'blue',
'lines.dash_capstyle': 'butt',
'lines.dash_joinstyle': 'round',
'lines.linestyle': '-',
'lines.linewidth': 3.0,
'lines.marker': 'None',
'lines.markeredgewidth': 0.5,
'lines.markersize': 11.0,
'lines.solid_capstyle': 'projecting',
'lines.solid_joinstyle': 'round',
'maskedarray': 'obsolete',
'mathtext.bf': 'serif:bold',
'mathtext.cal': 'cursive',
'mathtext.default': 'it',
'mathtext.fallback_to_cm': True,
'mathtext.fontset': 'cm',
'mathtext.it': 'serif:italic',
'mathtext.rm': 'serif',
'mathtext.sf': 'sans-serif',
'mathtext.tt': 'monospace',
'numerix': 'obsolete',
'patch.antialiased': True,
'patch.edgecolor': 'k',
'patch.facecolor': 'b',
'patch.linewidth': 1.0,
'path.simplify': True,
'path.simplify_threshold': 0.1111111111111111,
'pdf.compression': 6,
'pdf.fonttype': 3,
'pdf.inheritcolor': False,
'pdf.use14corefonts': False,
'plugins.directory': '.matplotlib_plugins',
'polaraxes.grid': True,
'ps.distiller.res': 6000,
'ps.fonttype': 3,
'ps.papersize': 'a6',
'ps.useafm': False,
'ps.usedistiller': 'xpdf',
'savefig.dpi': 300.0,
'savefig.edgecolor': 'white',
'savefig.facecolor': 'white',
'savefig.orientation': 'landscape',
'svg.embed_char_paths': True,
'svg.image_inline': True,
'svg.image_noscale': False,
'text.color': 'black',
'text.dvipnghack': None,
'text.fontangle': 'normal',
'text.fontsize': 'medium',
'text.fontstyle': 'normal',
'text.fontvariant': 'normal',
'text.fontweight': 'normal',
'text.latex.preamble': [''],
'text.latex.preview': False,
'text.latex.unicode': False,
'text.usetex': True,
'timezone': 'Europe/Berlin',
'tk.pythoninspect': False,
'tk.window_focus': False,
'toolbar': 'toolbar2',
'units': False,
'verbose.fileo': 'sys.stdout',
'verbose.level': 'helpful',
'xtick.color': 'k',
'xtick.direction': 'in',
'xtick.labelsize': 12.0,
'xtick.major.pad': 4.0,
'xtick.major.size': 8.0,
'xtick.minor.pad': 4.0,
'xtick.minor.size': 4.0,
'ytick.color': 'k',
'ytick.direction': 'in',
'ytick.labelsize': 12.0,
'ytick.major.pad': 4.0,
'ytick.major.size': 8.0,
'ytick.minor.pad': 4.0,
'ytick.minor.size': 4.0}

SourceForge History

  • On Sat Jun 5 14:41:26 2010, by leejjoon: resolution_id: 100
  • On Sat Jun 5 14:41:26 2010, by leejjoon: data_type: 560723
  • On Wed Dec 2 11:04:18 2009, by sboz: File Added: 353599: smaller.eps
  • On Wed Dec 2 11:03:39 2009, by sboz: File Added: 353598: a6.eps
@ghost ghost assigned leejjoon Jun 21, 2011
@efiring
Copy link
Member

efiring commented Jun 21, 2011

JJ, should this still be open? And should it get the "wishlist" tag?

@leejjoon
Copy link
Contributor

I believe that the issue itself is fixed but I was not quite happy with how I fixed it.
But I doubt if there is a better solution. Given that there has been no other suggestion, I am inclined to close it.

@efiring efiring closed this as completed Jun 21, 2011
jeromefv added a commit to jeromefv/matplotlib that referenced this issue Jan 27, 2021
jeromefv added a commit to jeromefv/matplotlib that referenced this issue Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants