Skip to content

Commit

Permalink
Troubleshooting mpl Tick label (fixes #82)
Browse files Browse the repository at this point in the history
  • Loading branch information
LSYS committed Dec 14, 2023
1 parent dccec4f commit de6b9e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion forestplot/graph_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,10 @@ def draw_tablelines(
Matplotlib Axes object.
"""
first_yticklab = ax.get_yaxis().majorTicks[-1]
bbox_disp = first_yticklab.label.get_window_extent()
try:
bbox_disp = first_yticklab.label.get_window_extent()
except AttributeError:
bbox_disp = first_yticklab.label1.get_window_extent()
(x0, _), (x1, _) = ax.transData.inverted().transform(bbox_disp)
upper_lw, lower_lw = 2, 1.3
nrows = len(dataframe)
Expand Down

0 comments on commit de6b9e7

Please sign in to comment.