Skip to content

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

Merged
merged 5 commits into from
May 31, 2017

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented May 28, 2017

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

@QuLogic QuLogic changed the title Merged pylab example cleanups Cleanup of merged pylab examples May 28, 2017

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
Copy link
Contributor

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',
Copy link
Contributor

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?

Copy link
Member Author

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.

@choldgraf
Copy link
Contributor

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!

@QuLogic QuLogic force-pushed the pylab-example-cleanups branch from ac305a9 to fd2540c Compare May 28, 2017 20:49
@@ -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)
Copy link
Member Author

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)
Copy link
Member Author

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.

@QuLogic QuLogic force-pushed the pylab-example-cleanups branch from fd2540c to dc0f0c1 Compare May 28, 2017 21:04
@QuLogic
Copy link
Member Author

QuLogic commented May 28, 2017

Rebased to fix the typo and the two other plt.subplots calls I just noticed.

@QuLogic
Copy link
Member Author

QuLogic commented May 28, 2017

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.

@QuLogic QuLogic force-pushed the pylab-example-cleanups branch from dc0f0c1 to 869bd95 Compare May 29, 2017 08:03
@dstansby dstansby added this to the 2.1 (next point release) milestone May 29, 2017
@tacaswell tacaswell merged commit d52bdc3 into matplotlib:master May 31, 2017
@QuLogic QuLogic deleted the pylab-example-cleanups branch May 31, 2017 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants