Skip to content

Commit 37a9b05

Browse files
add fix to Arc2D: mpl_plot
1 parent 1c74911 commit 37a9b05

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fix
1515
- Remove offline mode
16+
- Arc2D: mpl_plot
1617

1718
### Refactor
1819
- Implements InteractiveObject for handling all mouse objects in one class

plot_data/core.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,11 +1178,14 @@ def mpl_plot(self, ax=None, **kwargs):
11781178
kwargs.pop("edge_style")
11791179
else:
11801180
edgecolor = plot_data.colors.BLACK.rgb
1181+
theta1, theta2 = self.start_angle, self.end_angle
1182+
if self.clockwise:
1183+
theta1, theta2 = self.end_angle, self.start_angle
11811184

11821185
ax.add_patch(
11831186
Arc((self.cx, self.cy), 2 * self.r, 2 * self.r, angle=0,
1184-
theta1=self.start_angle * 0.5 / math.pi * 360,
1185-
theta2=self.end_angle * 0.5 / math.pi * 360,
1187+
theta1=theta1 * 0.5 / math.pi * 360,
1188+
theta2=theta2 * 0.5 / math.pi * 360,
11861189
edgecolor=edgecolor), **kwargs)
11871190

11881191
return ax

0 commit comments

Comments
 (0)