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
use %matplotlib
in example notebooks
#3683
Conversation
add `Populating namespace` message to `%pylab` from @fperez
config=True, | ||
help="""Configure matplotlib for interactive use with | ||
the default matplotlib backend.""" | ||
) | ||
pylab = CaselessStrEnum(['tk', 'qt', 'wx', 'gtk', 'osx', 'inline', 'auto'], |
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.
Want to share the 2 list maybe ?
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.
done.
did you removed |
just like pylab, but for `enable_matplotlib` instead
minidom.parseString doesn't like unicode objects
prefer `%matplotlib` and explicit imports
Renamed it, forgot to add the renamed notebook. Should be there now. |
had a quick read-through. LGTM. |
OK, seems fine playing around. You don't want to add just the list of import statements in the pylab docs? By the way, why is the default inline backend PNG? SVG seems to me to be a much better choice. |
I like the --no-import-all option. |
What about mention of --pylab? |
The main problem is perhaps htmlnotebook.txt, which I am working on rewriting. |
@dpsanders - it was getting re-wrapped because it was in an argument instead of the main description. It should be more to your taste now: In [1]: %pylab?
%pylab [--no-import-all] [gui]
Load numpy and matplotlib to work interactively.
This function lets you activate pylab (matplotlib, numpy and
interactive support) at any point during an IPython session.
%pylab makes the following imports::
import numpy
import matplotlib
from matplotlib import pylab, mlab, pyplot
np = numpy
plt = pyplot
from IPython.display import display
from IPython.core.pylabtools import figsize, getfigs
from pylab import *
from numpy import *
If you pass `--no-import-all`, the last to `*` imports will be excluded. |
Excellent, thanks! |
from no-import-all description, which gets re-wrapped by argparse.
how embarrassing! force-pushed fix, to hide my shame from the git history :) |
And finally what is the rationale for the pylabtools imports? By the way, how do you get such nice syntax highlighting...? |
Backward compatibility. I'm not changing how pylab behaves. I don't remember when or why they were added.
GitHub takes care of that, I just pasted the docstring inside
so it treats the whole thing as Python (note how it highlighted |
use `%matplotlib` in example notebooks - removes any mention of `%pylab` in our examples - adds `--matplotlib` command-line flag, mapping to the new - adds `Populated namespace` message to %pylab output, at the request of @fperez. - fix unicode bug in SVG, discovered during testing closes #3680 closes #3684
use `%matplotlib` in example notebooks - removes any mention of `%pylab` in our examples - adds `--matplotlib` command-line flag, mapping to the new - adds `Populated namespace` message to %pylab output, at the request of @fperez. - fix unicode bug in SVG, discovered during testing closes ipython#3680 closes ipython#3684
%pylab
in our examples--matplotlib
command-line flag, mapping to the newPopulated namespace
message to %pylab output, at the request of @fperez.closes #3680
closes #3684