@@ -783,11 +783,13 @@ def _h_arrows(self, length):
783783 *length*:
784784 Length of the barb in points; the other parts of the barb
785785 are scaled against this.
786- Default is 9
786+ Default is 7.
787787
788- *pivot*: [ 'tip' | 'middle' ]
788+ *pivot*: [ 'tip' | 'middle' | float ]
789789 The part of the arrow that is at the grid point; the arrow rotates
790- about this point, hence the name *pivot*. Default is 'tip'
790+ about this point, hence the name *pivot*. Default is 'tip'. Can
791+ also be a number, which shifts the start of the barb that many
792+ points from the origin.
791793
792794 *barbcolor*: [ color | color sequence ]
793795 Specifies the color all parts of the barb except any flags. This
@@ -1009,7 +1011,8 @@ def _make_barbs(self, u, v, nflags, nbarbs, half_barb, empty_flag, length,
10091011
10101012 *pivot* specifies the point on the barb around which the
10111013 entire barb should be rotated. Right now, valid options are
1012- 'head' and 'middle'.
1014+ 'tip' and 'middle'. Can also be a number, which shifts the start
1015+ of the barb that many points from the origin.
10131016
10141017 *sizes* is a dictionary of coefficients specifying the ratio
10151018 of a given feature to the length of the barb. These features
@@ -1032,7 +1035,7 @@ def _make_barbs(self, u, v, nflags, nbarbs, half_barb, empty_flag, length,
10321035
10331036 *flip* is a flag indicating whether the features should be flipped to
10341037 the other side of the barb (useful for winds in the southern
1035- hemisphere.
1038+ hemisphere) .
10361039
10371040 This function returns list of arrays of vertices, defining a polygon
10381041 for each of the wind barbs. These polygons have been rotated to
@@ -1054,7 +1057,10 @@ def _make_barbs(self, u, v, nflags, nbarbs, half_barb, empty_flag, length,
10541057 full_height = - full_height
10551058
10561059 endx = 0.0
1057- endy = pivot_points [pivot .lower ()]
1060+ try :
1061+ endy = float (pivot )
1062+ except ValueError :
1063+ endy = pivot_points [pivot .lower ()]
10581064
10591065 # Get the appropriate angle for the vector components. The offset is
10601066 # due to the way the barb is initially drawn, going down the y-axis.
0 commit comments