-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
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 |
@@ -20,6 +20,11 @@ revision, see the :ref:`github-stats`. | |||
new in matplotlib-1.3 | |||
===================== | |||
|
|||
Initialize a rotated rectangle | |||
------------------------------ | |||
Damon McDougall extended the `~matplotlib.patches.Rectangle` constructor to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be :class:
~matplotlib.patches.Rectangle``
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
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.