Skip to content

Commit 87119ea

Browse files
timhoffmtacaswell
andauthored
The Artist property rasterized cannot be None anymore (#18989)
* The Artist property rasterized cannot be None anymore It is now a bool only. Before the default was non and `Artist.set_rasterized` documented to accept *None*. However, *None* did not have a special meaning and was treated as *False. * DOC: add missing markup * Fix unresolved reference. Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
1 parent 3b9ec68 commit 87119ea

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The Artist property *rasterized* cannot be *None* anymore
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
It is now a bool only. Before the default was non and `.Artist.set_rasterized`
4+
documented to accept *None*. However, *None* did not have a special meaning
5+
and was treated as *False*.

lib/matplotlib/artist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __init__(self):
113113
self._label = ''
114114
self._picker = None
115115
self._contains = None
116-
self._rasterized = None
116+
self._rasterized = False
117117
self._agg_filter = None
118118
# Normally, artist classes need to be queried for mouseover info if and
119119
# only if they override get_cursor_data.
@@ -898,7 +898,7 @@ def set_rasterized(self, rasterized):
898898
899899
Parameters
900900
----------
901-
rasterized : bool or None
901+
rasterized : bool
902902
"""
903903
if rasterized and not hasattr(self.draw, "_supports_rasterization"):
904904
cbook._warn_external(

0 commit comments

Comments
 (0)