Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Figure rotation using Axes.text () with eps backend #10290

Copy link
Copy link
Closed
@mauriceleutenegger

Description

@mauriceleutenegger
Issue body actions

Bug report

Bug summary

When I use the Axes.text () method with rotation='vertical', and call it a sufficient number of times (greater than 7 times in the example below), the resulting figure is rotated by 90 degrees if saved to an eps file. The plot is normal (unrotated) if any of the following are satisfied: Axes.text() is called less than 7 times; or the plot is saved directly to a png file; or the calls to Axes.text() do not specify rotation='vertical'.

Code for reproduction

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 = (xmax / ntext) * i
    n = 'test{}'.format (i)
    ax.text (xtext, ytext, n, rotation='vertical')

f.savefig ('test.eps')

Actual outcome

The gzipped eps file is attached, as is a png created from the eps using ImageMagick convert.
test.eps.gz
test

Expected outcome

An unrotated plot, regardless of the number of times Axes.text() is called.

Matplotlib version

  • Operating system: OS X 10.13.2
  • Matplotlib version: anaconda 2.1.1 py27hb768455_0
  • Matplotlib backend : Qt5Agg
  • Python version: Python 2.7.14 |Anaconda custom (64-bit)| (default, Dec 7 2017, 11:07:58)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.