Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Move and clean some pylab examples #8813

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 4 commits into from
Jul 28, 2017
Merged

Conversation

dstansby
Copy link
Member

Some more pylab moves (maybe I'll get them all done by 2.1...). A couple of notes:

  • I've PEP8 cleaned the moved files
  • I've changed a couple of example colours to the default colour cycle

@@ -0,0 +1,37 @@
"""
============
Axhspan Demo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "axhspan" (lowercase). Probably there are other cases of wrong uppercasing, haven't checked.

y = (figheight - 0.7 - i % nrow) # /figheight
p = mpatches.Circle((x, y), 0.2)
ax.add_patch(p)

ax.annotate(to_texstring(stylename), (x, y),
(x - 1.2, y),
#xycoords="figure fraction", textcoords="figure fraction",
# xycoords="figure fraction", textcoords="figure fraction",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the comment is not relevant, just remove it.

# Draw a default vline at x=1 that spans the yrange
plt.axvline(x=1)

# Draw a thick blue vline at x=0 that spans the upper quadrant of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment and the one below do not need to be linewrapped

@@ -14,9 +14,9 @@
# create some data to use for the plot
dt = 0.001
t = np.arange(0.0, 10.0, dt)
r = np.exp(-t[:1000]/0.05) # impulse response
r = np.exp(-t[:1000] / 0.05) # impulse response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment should be closer

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jun 27, 2017
@tacaswell
Copy link
Member

This seems to have broken a link

URL        `../../gallery/pylab_examples/bar_stacked.html'
Name       `bar_stacked.py'
Parent URL file:///home/travis/build/matplotlib/matplotlib/doc/build/html/tutorials/01_introductory/sample_plots.html, line 237, col 2
Real URL   file:///home/travis/build/matplotlib/matplotlib/doc/build/html/gallery/pylab_examples/bar_stacked.html
Check time 0.003 seconds
Result     Error: URLError: <urlopen error [Errno 2] No such file or directory: '/home/travis/build/matplotlib/matplotlib/doc/build/html/gallery/pylab_examples/bar_stacked.html'>

@QuLogic
Copy link
Member

QuLogic commented Jul 19, 2017

Hmm, can you rebase this?

@dstansby dstansby force-pushed the pylab-moves branch 2 times, most recently from 0e810e2 to 94bdcbe Compare July 23, 2017 20:46
@dstansby
Copy link
Member Author

Rebased, would be worth someone checking the file that is deleted and re-added in the diff.

@NelleV NelleV merged commit 0d1d968 into matplotlib:master Jul 28, 2017
@dstansby dstansby deleted the pylab-moves branch July 29, 2017 17:41
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.

5 participants