Closed
Description
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
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
Labels
No labels