File: api_changes_1.5.3.rst

package info (click to toggle)
matplotlib 3.10.1%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 78,340 kB
  • sloc: python: 147,118; cpp: 62,988; objc: 1,679; ansic: 1,426; javascript: 786; makefile: 92; sh: 53
file content (26 lines) | stat: -rw-r--r-- 1,380 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
API Changes in 1.5.3
====================

``ax.plot(..., marker=None)`` gives default marker
--------------------------------------------------

Prior to 1.5.3 keyword arguments passed to `~matplotlib.axes.Axes.plot` were
handled in two parts -- default keyword arguments generated internal to
`~matplotlib.axes.Axes.plot` (such as the cycled styles) and user supplied
keyword arguments.  The internally generated keyword arguments were passed to
the `matplotlib.lines.Line2D` and the user keyword arguments were passed to
``ln.set(**kwargs)`` to update the artist after it was created.  Now both sets
of keyword arguments are merged and passed to `~matplotlib.lines.Line2D`.  This
change was made to allow *None* to be passed in via the user keyword arguments
to mean 'do the default thing' as is the convention through out Matplotlib
rather than raising an exception.

Unlike most `~matplotlib.lines.Line2D` setter methods
`~matplotlib.lines.Line2D.set_marker` did accept `None` as a valid
input which was mapped to 'no marker'.  Thus, by routing this
``marker=None`` through ``__init__`` rather than ``set(...)`` the meaning
of ``ax.plot(..., marker=None)`` changed from 'no markers' to 'default markers
from rcparams'.

This is change is only evident if ``mpl.rcParams['lines.marker']`` has a value
other than ``'None'`` (which is string ``'None'`` which means 'no marker').