File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
doc/api/next_api_changes/behavior Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ ``ContourSet `` is now a single Collection
2+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+ Prior to this release, `.ContourSet ` (the object returned by `~.Axes.contour `)
5+ was a custom object holding multiple `.Collection `\s (and not an `.Artist `)
6+ -- one collection per level, each connected component of that level's contour
7+ being an entry in the corresponding collection.
8+
9+ `.ContourSet ` is now instead a plain `.Collection ` (and thus an `.Artist `).
10+ The collection contains a single path per contour level; this path may be
11+ non-continuous in case there are multiple connected components.
12+
13+ Setting properties on the ContourSet can now usually be done using standard
14+ collection setters (``cset.set_linewidth(3) `` to use the same linewidth
15+ everywhere or ``cset.set_linewidth([1, 2, 3, ...]) `` to set different
16+ linewidths on each level) instead of having to go through the individual
17+ sub-components (``cset.collections[0].set_linewidth(...) ``). Note that
18+ during the transition period, it remains possible to access the (deprecated)
19+ ``.collections `` attribute; this causes the ContourSet to modify itself to use
20+ the old-style multi-Collection representation.
You can’t perform that action at this time.
0 commit comments