Skip to content

Commit f9da410

Browse files
AlFontalhas2k1
authored andcommitted
fix: correctly access axes ranges after coord flip in geom_path
1 parent b6dfd1e commit f9da410

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plotnine/geoms/geom_path.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,8 @@ def get_paths(
425425
# We need the axes dimensions so that we can
426426
# compute scaling factors
427427
width, height = _axes_get_size_inches(ax)
428-
ranges = coord.range(panel_params)
429-
width_ = np.ptp(ranges.x)
430-
height_ = np.ptp(ranges.y)
428+
width_ = np.ptp(panel_params.x.range)
429+
height_ = np.ptp(panel_params.y.range)
431430

432431
# scaling factors to prevent skewed arrowheads
433432
lx = self.length * width_ / width

0 commit comments

Comments
 (0)