Add angle kwarg to patches.Rectangle#1405
Conversation
|
Here's an example: import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
r = Rectangle((0.5, 1.0), 2, 1, angle=45.0)
ax.add_patch(r)
ax.set_xlim(0, 3)
ax.set_ylim(0, 3)
ax.set_aspect('equal')
fig.savefig('rect.pdf') |
|
@dmcdougall Thanks!! |
|
Nice solution to the problem. 👍 |
|
When will this be merged? It's really useful to me. |
|
I should add an entry to |
|
On Sunday, November 4, 2012, Damon McDougall wrote:
|
|
Added a note in |
doc/users/whats_new.rst
Outdated
There was a problem hiding this comment.
should be :class:~matplotlib.patches.Rectangle``
Allows rotation of a rectangle upon instantiation.
|
@dmcdougall How's your friend Travis going? |
|
@wkerzendorf He gave this PR the all-clear. I'm just waiting on some of the other devs to give feedback and merge it. I am against merging my own pull requests unless they're trivial changes. |
Add angle kwarg to patches.Rectangle
|
Thanks @dmcdougall (and @wkerzendorf for the nudging 😉 ). Merged. |
Allows rotation of a rectangle upon instantiation.
Addresses #987.
The old attempt was #1156.