@@ -2652,7 +2652,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
26522652
26532653 @_preprocess_data ()
26542654 def stem (self , * args , linefmt = None , markerfmt = None , basefmt = None , bottom = 0 ,
2655- label = None , use_line_collection = False ):
2655+ label = None , use_line_collection = True ):
26562656 """
26572657 Create a stem plot.
26582658
@@ -2709,12 +2709,12 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
27092709 label : str, default: None
27102710 The label to use for the stems in legends.
27112711
2712- use_line_collection : bool, default: False
2712+ use_line_collection : bool, default: True
27132713 If ``True``, store and plot the stem lines as a
2714- `~.collections.LineCollection` instead of individual lines. This
2715- significantly increases performance, and will become the default
2716- option in Matplotlib 3.3. If ``False``, defaults to the old
2717- behavior of using a list of `.Line2D` objects .
2714+ `~.collections.LineCollection` instead of individual lines, which
2715+ significantly increases performance. If ``False``, defaults to the
2716+ old behavior of using a list of `.Line2D` objects. This parameter
2717+ may be deprecated in the future .
27182718
27192719 Returns
27202720 -------
@@ -2802,12 +2802,6 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
28022802 self .add_collection (stemlines )
28032803 # Old behaviour is to plot each of the lines individually
28042804 else :
2805- cbook ._warn_external (
2806- 'In Matplotlib 3.3 individual lines on a stem plot will be '
2807- 'added as a LineCollection instead of individual lines. '
2808- 'This significantly improves the performance of a stem plot. '
2809- 'To remove this warning and switch to the new behaviour, '
2810- 'set the "use_line_collection" keyword argument to True.' )
28112805 stemlines = []
28122806 for xi , yi in zip (x , y ):
28132807 l , = self .plot ([xi , xi ], [bottom , yi ],
0 commit comments