Skip to content
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

Pass options to ps2pdf using -foo#bar instead of -foo=bar. #10295

Merged
merged 1 commit into from Jan 24, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 23, 2018

The former works both on Windows and Linux (so we can stick to it)
whereas the later only works on Linux (so we had to use a switch
depending on the OS).

Will conflict #10294, but easy to resolve either...

Closes #10290

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

"-dAutoFilterColorImages#false",
"-dAutoFilterGrayImages#false",
"-sGrayImageFilter#FlateEncode",
"-sColorImageFilter#FlateEncode",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.... add the autorotate thing and I'll close my PR if this works...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-dAutoRotatePages#false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

The former works both on Windows and Linux (so we can stick to it)
whereas the later only works on Linux (so we had to use a switch
depending on the OS).
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked on my machine w/ cde

import matplotlib
matplotlib.rcParams['ps.usedistiller'] = 'xpdf'

import matplotlib.pyplot as pl

f = pl.figure (figsize=(7,5))
ax = f.add_axes ([0.15,0.15,0.8,0.8])
ax.set_ylim (0., 1.)
ax.set_xlim (0., 1.)

ntext = 8 # this is the minimum number of calls to get rotation
ytext = 0.5
for i in range (ntext) :
    xtext = (1. / ntext) * i
    n = 'test{}'.format (i)
    ax.text (xtext, ytext, n, rotation='vertical')

f.savefig ('test.eps')

@tacaswell tacaswell added this to the v2.2 milestone Jan 23, 2018
@jklymak jklymak added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jan 23, 2018
Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending CI...

@jklymak
Copy link
Member

jklymak commented Jan 24, 2018

Well it works on linux, and it should be the same code on Windows, so I'll take a chance and merge it.

@jklymak jklymak merged commit b42db80 into matplotlib:master Jan 24, 2018
@anntzer anntzer deleted the ghostscript-options branch January 24, 2018 17:52
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Figure rotation using Axes.text () with eps backend
5 participants