@@ -2723,14 +2723,14 @@ def broken_barh(self, xranges, yrange, **kwargs):
2723
2723
2724
2724
@_preprocess_data ()
2725
2725
def stem (self , * args , linefmt = None , markerfmt = None , basefmt = None , bottom = 0 ,
2726
- label = None , use_line_collection = True , orientation = 'horizontal ' ):
2726
+ label = None , use_line_collection = True , orientation = 'vertical ' ):
2727
2727
"""
2728
2728
Create a stem plot.
2729
2729
2730
2730
A stem plot draws lines perpendicular to a baseline at each location
2731
2731
*locs* from the baseline to *heads*, and places a marker there. For
2732
- horizontal stem plots (the default), the *locs* are *x* positions, and
2733
- the *heads* are *y* values. For vertical stem plots, the *locs* are
2732
+ vertical stem plots (the default), the *locs* are *x* positions, and
2733
+ the *heads* are *y* values. For horizontal stem plots, the *locs* are
2734
2734
*y* positions, and the *heads* are *x* values.
2735
2735
2736
2736
Call signature::
@@ -2743,12 +2743,12 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
2743
2743
Parameters
2744
2744
----------
2745
2745
locs : array-like, default: (0, 1, ..., len(heads) - 1)
2746
- For horizontal stem plots, the x-positions of the stems.
2747
- For vertical stem plots, the y-positions of the stems.
2746
+ For vertical stem plots, the x-positions of the stems.
2747
+ For horizontal stem plots, the y-positions of the stems.
2748
2748
2749
2749
heads : array-like
2750
- For horizontal stem plots, the y-values of the stem heads.
2751
- For vertical stem plots, the x-values of the stem heads.
2750
+ For vertical stem plots, the y-values of the stem heads.
2751
+ For horizontal stem plots, the x-values of the stem heads.
2752
2752
2753
2753
linefmt : str, optional
2754
2754
A string defining the properties of the vertical lines. Usually,
@@ -2779,12 +2779,12 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
2779
2779
basefmt : str, default: 'C3-' ('C2-' in classic mode)
2780
2780
A format string defining the properties of the baseline.
2781
2781
2782
- orientation : str, default: 'horizontal '
2783
- If 'vertical', will produce a vertically-oriented stem plot ,
2784
- else it will produce a horizontally- oriented stem plot .
2782
+ orientation : str, default: 'vertical '
2783
+ If 'vertical', will produce a plot with stems oriented vertically ,
2784
+ otherwise the stems will be oriented horizontally .
2785
2785
2786
2786
bottom : float, default: 0
2787
- The y-position of the baseline.
2787
+ The y/x -position of the baseline (depending on orientation) .
2788
2788
2789
2789
label : str, default: None
2790
2790
The label to use for the stems in legends.
@@ -2822,7 +2822,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
2822
2822
else :
2823
2823
locs , heads , * args = args
2824
2824
2825
- if orientation == 'horizontal ' :
2825
+ if orientation == 'vertical ' :
2826
2826
self ._process_unit_info (xdata = locs , ydata = heads )
2827
2827
locs = self .convert_xunits (locs )
2828
2828
heads = self .convert_yunits (heads )
@@ -2880,7 +2880,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
2880
2880
2881
2881
# New behaviour in 3.1 is to use a LineCollection for the stemlines
2882
2882
if use_line_collection :
2883
- if orientation == 'vertical ' :
2883
+ if orientation == 'horizontal ' :
2884
2884
stemlines = [
2885
2885
((bottom , loc ), (head , loc ))
2886
2886
for loc , head in zip (locs , heads )]
@@ -2898,7 +2898,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
2898
2898
else :
2899
2899
stemlines = []
2900
2900
for loc , head in zip (locs , heads ):
2901
- if orientation == 'vertical ' :
2901
+ if orientation == 'horizontal ' :
2902
2902
xs = [bottom , head ]
2903
2903
ys = [loc , loc ]
2904
2904
else :
@@ -2909,7 +2909,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
2909
2909
marker = linemarker , label = "_nolegend_" )
2910
2910
stemlines .append (l )
2911
2911
2912
- if orientation == 'vertical ' :
2912
+ if orientation == 'horizontal ' :
2913
2913
marker_x = heads
2914
2914
marker_y = locs
2915
2915
baseline_x = [bottom , bottom ]
0 commit comments