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

Appearance settings

Commit f56d915

Browse filesBrowse files
committed
added the round function to calculate accurate result
1 parent ef1f8c9 commit f56d915
Copy full SHA for f56d915

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎examples/pie_and_polar_charts/pie_and_donut_labels.py

Copy file name to clipboardExpand all lines: examples/pie_and_polar_charts/pie_and_donut_labels.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444

4545
def func(pct, allvals):
46-
absolute = int(pct/100.*np.sum(allvals))
46+
absolute = int(round(pct/100.*np.sum(allvals)))
4747
return "{:.1f}%\n({:d} g)".format(pct, absolute)
4848

4949

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.