Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60264b2

Browse files
committed
FIX: brokenbarh math before units
1 parentd797669 commit60264b2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎lib/matplotlib/axes/_axes.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,11 +2525,12 @@ def broken_barh(self, xranges, yrange, **kwargs):
25252525
self._process_unit_info(xdata=xdata,
25262526
ydata=ydata,
25272527
kwargs=kwargs)
2528-
fornn,xrinxranges:
2528+
xnew= []
2529+
forxrinxranges:
25292530
# convert the absolute values, not the x and dx...
2530-
xranges[nn]=[self.convert_xunits(xr[0]),
2531-
self.convert_xunits(xr[0]+xr[1])]
2532-
xranges[nn][1]=xranges[nn][1]-xranges[nn][0]
2531+
xnew.append([self.convert_xunits(xr[0]),
2532+
self.convert_xunits(xr[0]+xr[1])])
2533+
xnew[-1][1]=xnew[-1][1]-xnew[-1][0]
25332534

25342535
yrange=self.convert_yunits(yrange)
25352536

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp