-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Cleanup of merged pylab examples #8677
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
Conversation
|
||
plt.show() | ||
|
||
|
||
############################################################################### | ||
# You can specify whether images should be plotted with the array origin | ||
# x[0,0] in the upper left or upper right by using the origin parameter. | ||
# x[0,0] in the upper left or lower right by using the origin parameter. | ||
# You can also control the default be setting image.origin in your |
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.
I'm gonna mark typeos w/ TYPEO
in the comment as a reminder to go back @ the end and fix the typos just before merging. (there's one in this line) "control the default be setting"
@@ -152,7 +152,7 @@ def test4(ax): | |||
ax.add_patch(p_fancy) | |||
|
|||
ax.text(0.1, 0.8, | |||
' boxstyle="round,pad=0.3"\n mutation\\_aspect=.5', | |||
' boxstyle="round,pad=0.3"\n mutation_aspect=.5', |
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.
I guess we don't have to worry about these getting rendered as math now? Or is that intended behavior now?
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.
Only if wrapped in $
, or maybe a usetex=True
got removed at some point? They're definitely not needed right now though.
Just took a pass through it and I noticed very few problems (in comments) - it looks great to me and I think this is a good improvement towards making the docs more consistent! |
ac305a9
to
fd2540c
Compare
examples/pylab_examples/spy_demos.py
Outdated
@@ -7,15 +7,15 @@ | |||
""" | |||
|
|||
from matplotlib.pyplot import figure, show | |||
import numpy | |||
import numpy as np | |||
|
|||
fig = figure() | |||
ax1 = fig.add_subplot(221) | |||
ax2 = fig.add_subplot(222) | |||
ax3 = fig.add_subplot(223) | |||
ax4 = fig.add_subplot(224) |
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.
Oh, I should probably change this one to subplots
, too.
@@ -5,17 +5,17 @@ | |||
|
|||
""" | |||
import matplotlib.pyplot as plt | |||
import numpy.random as rnd | |||
import numpy as np | |||
|
|||
fig = plt.figure() | |||
plt.subplot(221) |
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.
And one more subplots
here as well.
fd2540c
to
dc0f0c1
Compare
Rebased to fix the typo and the two other |
Just noticed that #8633 was not merged yet and it moves around a few of these files. I'd hold off on merging this one until that one's in, and I can rebase this one. |
dc0f0c1
to
869bd95
Compare
These are fixes I noticed in #8266 but never finished commenting. And anyway, since that was a merge-everything PR, trying to fill it with a lot of cleanup would be confusing.
Much of this is just trying to maintain some consistency within a file, e.g., if one example used OO and one example used pyplot, switch to just OO.
@choldgraf