Skip to content

Doc v2 release notes #6994

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 27 commits into from
Sep 5, 2016
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bb775aa
DOC: merge api changes into main api_changes.rst
tacaswell Aug 27, 2016
7314c90
DOC: move whats_new files into main whats_new.rst
tacaswell Aug 27, 2016
0d4c84a
DOC: merge the rcparams sections
tacaswell Aug 27, 2016
4be1c14
DOC: document 'CN' pattern of naming colors
tacaswell Aug 27, 2016
7a6429e
DOC: fix rst
tacaswell Aug 27, 2016
19a96c1
WIP: split up whats_new
tacaswell Aug 27, 2016
628f4c1
FIX: correct name of seaborn stylesheet
tacaswell Aug 28, 2016
fa4fbe1
DOC: work on color documentation
tacaswell Aug 28, 2016
b314fbb
DOC: minor changes to old whats_new
tacaswell Aug 28, 2016
97b0574
DOC: move style change documentation around a bit
tacaswell Aug 28, 2016
39636b0
DOC: start to re-arrange top-level organization
tacaswell Aug 28, 2016
cdc11fe
DOC: yet more re-organization / consolidation
tacaswell Aug 28, 2016
534778f
FIX: properly rename seaborn style sheet
tacaswell Aug 28, 2016
251ae73
DOC: update colormap section
tacaswell Aug 29, 2016
ee0d3e2
DOC: fix adornments
tacaswell Aug 29, 2016
7652e40
DOC: clean up API changes a bit
tacaswell Aug 29, 2016
f1753b7
DOC: yet more work on new defaults
tacaswell Aug 29, 2016
b11d170
API: add `lines.scale_dashes` rcParam
tacaswell Aug 29, 2016
6f43449
FIX: matplotlibrc.template to match rcsetup
tacaswell Aug 29, 2016
b6e9648
DOC: add section on `plot`
tacaswell Aug 29, 2016
dbab147
DOC: edits colors.rst
tacaswell Aug 30, 2016
ce9243e
DOC: minor wording / punctuation changes
tacaswell Aug 30, 2016
f81a08d
DOC: Fix small issues in new release notes.
QuLogic Aug 30, 2016
1aaa2c0
DOC: add patch section
tacaswell Aug 30, 2016
d925fff
DOC: add section on dpi / figure size / font size
tacaswell Aug 30, 2016
89add4c
DOC: yet more doc changes
tacaswell Sep 3, 2016
6d97f09
DOC: cleanups in api_changes for v1.5 and later
efiring Sep 5, 2016
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
Prev Previous commit
Next Next commit
DOC: update colormap section
  • Loading branch information
tacaswell committed Sep 4, 2016
commit 251ae73e24bd35557e609cde04b6e5a410db8823
78 changes: 60 additions & 18 deletions doc/users/dflt_style_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ default style.
While it is impossible to select the best default for all cases, these
are designed to work well in the most common cases.

A 'classic' style sheet will be provided so reverting to the 1.x
default values will be a single line of python
A 'classic' style sheet is provided so reverting to the 1.x default
values is a single line of python

.. code::

mpl.style.use('classic')

See :ref:`customizing-with-matplotlibrc-files` for details about how to
persistently and selectively revert many of these changes.


colors, color cycles, and color maps
====================================
Expand Down Expand Up @@ -79,45 +82,84 @@ colors. This allows the first 10 colors in
``mpl.rcParms['axes.prop_cycle']`` to be easily accessed. See
:ref:`colors` for more details.

To restore only the old color cycle use

.. code::

from cycler import cycler
mpl.rcParams['axes.prop_cycle'] = cycler(color='bgrcmyk')

or setting

.. code::

axes.prop_cycle : cycler('color', 'bgrcmyk')

in your :file:`matplotlibrc` file.

Colormap
--------


``matplotlib`` is changing the default colormap and styles in the
upcoming 2.0 release!
The new default color map used by `matplotlib.cm.ScalarMappable` instances is
`'viridis'` (aka `option D <http://bids.github.io/colormap/>`__).

.. plot::

import numpy as np
N = M = 200
X, Y = np.ogrid[0:20:N*1j, 0:20:M*1j]
data = np.sin(np.pi * X*2 / 20) * np.cos(np.pi * Y*2 / 20)

fig, ax = plt.subplots()
im = ax.imshow(data, extent=[0, 200, 0, 200])
fig.colorbar(im)
ax.set_title('viridis')

The new default color map will be 'viridis' (aka `option
D <http://bids.github.io/colormap/>`_). For an introduction to color
theory and how 'viridis' was generated watch Nathaniel Smith and
Stéfan van der Walt's talk from SciPy2015
For an introduction to color theory and how 'viridis' was generated
watch Nathaniel Smith and Stéfan van der Walt's talk from SciPy2015.
See `here for many more deatils <http://bids.github.io/colormap/>`__
about the other alternatives and the tools used to create the color
map. For details on all of color maps available in matplotlib see
:ref:`colormaps`.

.. raw:: html

<iframe width="560" height="315" src="https://www.youtube.com/embed/xAoljeRJ3lU" frameborder="0" allowfullscreen></iframe>


The previous default can be restored using

.. code::

Other
-----
mpl.rcParams['image.cmap'] = 'jet'

- The default figure background color has changed from grey to white.
Use the rcParam ``figure.facecolor`` to control this.
or setting

- The default cycle of colors to draw lines, markers and other content
has been changed.
.. code::

- The default color map used for images and pcolor meshes, etc., has
changed from ``jet`` to ``viridis``.
image.cmap : 'jet'

in your :file:`matplotlibrc` file, however this is strongly discouraged.

Other colors
------------

- The default interactive figure background color has changed from
grey to white. Use the rcParam ``figure.facecolor`` to control
this.

Grid lines
----------

- For markers, scatter plots, bar charts and pie charts, there is no
longer a black outline around filled markers by default.

- Grid lines are light grey solid 1pt lines. They are no longer dashed by
default.

Plots
=====
- For markers, scatter plots, bar charts and pie charts, there is no
longer a black outline around filled markers by default.

- The default size of the elements in a scatter plot is now based on
the rcParam ``lines.markersize`` so it is consistent with ``plot(X,
Expand Down