Skip to content

Updated whats new for nbagg and legend/patheffects docs. #3560

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 1 commit into from
Sep 30, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,28 @@ legibility through brightness variations. See
`here <https://github.com/wistia/heatmap-palette>`_
for more information.

Documentation changes
---------------------
The nbagg backend
-----------------
Phil Elson added a new backend, named "nbagg", which enables interactive
figures in a live IPython notebook session. The backend makes use of the
infrastructure developed for the webagg backend, which itself gives
standalone server backed interactive figures in the browser, however nbagg
does not require a dedicated matplotlib server as all communications are
handled through the IPython Comm machinery.

As with other backends nbagg can be enabled inside the IPython notebook with::

import matplotlib
matplotlib.use('nbagg')

Once figures are created and then subsequently shown, they will placed in an
interactive widget inside the notebook allowing panning and zooming in the
Copy link
Member

Choose a reason for hiding this comment

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

This should probably explicitly say that an explicit call to plt.show() is required (because we don't yet have the hooks set up right with ipython). See discussion at jupyter/docker-notebook#7 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

This should probably explicitly say that an explicit call to plt.show() is required

It isn't though - it behaves as any other backend does, namely, if you want to show a figure when not in interactive mode you have to do a plt.show(). I was also careful with the wording, in that it does currently state ...then subsequently shown.

Copy link
Member Author

Choose a reason for hiding this comment

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

Idea: It would be cool if display(fig) did the show for us even in non-interactive mode though.

same way as any other matplotlib backend. Because figures require a connection
to the IPython notebook server for their interactivity, once the notebook is
saved, each figure will be rendered as a static image - thus allowing
non-interactive viewing of figures on services such as
`nbviewer <http://nbviewer.ipython.org/>`_.

Phil Elson rewrote of the documentation and userguide for both Legend and PathEffects (links needed).


New plotting features
Expand Down Expand Up @@ -269,6 +287,7 @@ Controls whether figures are saved with a transparent
background by default. Previously `savefig` always defaulted
to a non-transparent background.


``axes.titleweight``
````````````````````
Added rcParam to control the weight of the title
Expand All @@ -281,6 +300,12 @@ an offset will be determined such that the tick labels are
meaningful. If `False` then the full number will be formatted in all
conditions.

``nbagg.transparent`` added
`````````````````````````````
Controls whether nbagg figures have a transparent
background. ``nbagg.transparent`` is ``True`` by default.


XDG compliance
``````````````
Matplotlib now looks for configuration files (both rcparams and style) in XDG
Expand Down Expand Up @@ -387,6 +412,12 @@ cause the context to be reset. This allows more than one distinct context to
be present in documentation. To enable this option, use ``:context: reset``
instead of ``:context:`` any time you want to reset the context.

Legend and PathEffects documentation
------------------------------------
The :ref:`plotting-guide-legend` and :ref:`patheffects-guide` have both been
updated to better reflect the full potential of each of these powerful
features.

Widgets
-------

Expand Down