Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 603a06b

Browse files
committed
use orientation value from kwargs
1 parent 9b48fd8 commit 603a06b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,10 +1271,11 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
12711271
minline = (lineoffsets - linelengths).min()
12721272
maxline = (lineoffsets + linelengths).max()
12731273

1274-
if colls[0].is_horizontal():
1275-
corners = (minpos, minline), (maxpos, maxline)
1276-
else:
1274+
if (orientation is not None and
1275+
orientation.lower() == "vertical"):
12771276
corners = (minline, minpos), (maxline, maxpos)
1277+
else: # "horizontal", None or "none" (see EventCollection)
1278+
corners = (minpos, minline), (maxpos, maxline)
12781279
self.update_datalim(corners)
12791280
self.autoscale_view()
12801281

0 commit comments

Comments
 (0)