@@ -2723,14 +2723,14 @@ def broken_barh(self, xranges, yrange, **kwargs):
27232723
27242724 @_preprocess_data ()
27252725 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 ' ):
27272727 """
27282728 Create a stem plot.
27292729
27302730 A stem plot draws lines perpendicular to a baseline at each location
27312731 *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
27342734 *y* positions, and the *heads* are *x* values.
27352735
27362736 Call signature::
@@ -2743,12 +2743,12 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
27432743 Parameters
27442744 ----------
27452745 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.
27482748
27492749 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.
27522752
27532753 linefmt : str, optional
27542754 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,
27792779 basefmt : str, default: 'C3-' ('C2-' in classic mode)
27802780 A format string defining the properties of the baseline.
27812781
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 .
27852785
27862786 bottom : float, default: 0
2787- The y-position of the baseline.
2787+ The y/x -position of the baseline (depending on orientation) .
27882788
27892789 label : str, default: None
27902790 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,
28222822 else :
28232823 locs , heads , * args = args
28242824
2825- if orientation == 'horizontal ' :
2825+ if orientation == 'vertical ' :
28262826 self ._process_unit_info (xdata = locs , ydata = heads )
28272827 locs = self .convert_xunits (locs )
28282828 heads = self .convert_yunits (heads )
@@ -2880,7 +2880,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
28802880
28812881 # New behaviour in 3.1 is to use a LineCollection for the stemlines
28822882 if use_line_collection :
2883- if orientation == 'vertical ' :
2883+ if orientation == 'horizontal ' :
28842884 stemlines = [
28852885 ((bottom , loc ), (head , loc ))
28862886 for loc , head in zip (locs , heads )]
@@ -2898,7 +2898,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
28982898 else :
28992899 stemlines = []
29002900 for loc , head in zip (locs , heads ):
2901- if orientation == 'vertical ' :
2901+ if orientation == 'horizontal ' :
29022902 xs = [bottom , head ]
29032903 ys = [loc , loc ]
29042904 else :
@@ -2909,7 +2909,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
29092909 marker = linemarker , label = "_nolegend_" )
29102910 stemlines .append (l )
29112911
2912- if orientation == 'vertical ' :
2912+ if orientation == 'horizontal ' :
29132913 marker_x = heads
29142914 marker_y = locs
29152915 baseline_x = [bottom , bottom ]
0 commit comments