Skip to content
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

Non-reproducible line in Image tutorial #9326

Closed
redi35 opened this issue Oct 8, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@redi35
Copy link

commented Oct 8, 2017

Bug report

Bug summary

The Image tutorial features a line of code which isn't reproducible. An Out[5] line is hard-coded into the tutorial by using a print(img) behind the scenes, in the source code of the article.

Code for reproduction

In[5]: img=mpimg.imread('stinkbug.png')

Actual outcome

No output.

Expected outcome

screenshot from 2017-10-08 21-52-41

Didactically, it would be a huge improvement to just call the resulting object after the assignment made above, i.e. actually generating the output which is contained in the Out[#]line:

In[6]: img

As is, there is a disconnect between the In[5]line and the following Out[5] in the tutorial. This is simply incorrect. It isn't reproducible and leaves room for unnecessary confusion for first readers.

Matplotlib version

  • Operating system: Ubuntu 16.04
  • Matplotlib version: 2.0.0
  • Matplotlib backend (print(matplotlib.get_backend())): nbAgg
  • Python version: 3.5.2
  • Jupyter version (if applicable):IPython 6.0.0
  • Other libraries:

@redi35 redi35 changed the title Non-reproducible in Image tutorial Non-reproducible line in Image tutorial Oct 8, 2017

@anntzer

This comment has been minimized.

Copy link
Contributor

commented Oct 16, 2017

This has been fixed as of 2.1.0 thanks to the switch to sphinx-gallery: http://matplotlib.org/tutorials/introductory/images.html#sphx-glr-tutorials-introductory-images-py

Closing, but feel free to request a reopen if anything is unclear.

@anntzer anntzer closed this Oct 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.