File: api_changes_2.1.2.rst

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

API Changes in 2.1.2
====================

`.Figure.legend` no longer checks for repeated lines to ignore
--------------------------------------------------------------

`matplotlib.figure.Figure.legend` used to check if a line had the
same label as an existing legend entry. If it also had the same line color
or marker color legend didn't add a new entry for that line. However, the
list of conditions was incomplete, didn't handle RGB tuples,
didn't handle linewidths or linestyles etc.

This logic did not exist in `.axes.Axes.legend`.  It was included (erroneously)
in Matplotlib 2.1.1 when the legend argument parsing was unified :ghpull:`9324`.  
This change removes that check in `.axes.Axes.legend` again to restore the old 
behavior.

This logic has also been dropped from `.Figure.legend`, where it
was previously undocumented. Repeated
lines with the same label will now each have an entry in the legend.  If
you do not want the duplicate entries, don't add a label to the line, or
prepend the label with an underscore.