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

Commit6cb93cd

Browse files
authored
DOC: don't index or unpack the return value of pie (#30799)
1 parentdcff41f commit6cb93cd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎galleries/examples/misc/demo_agg_filter.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,19 +269,19 @@ def drop_shadow_patches(ax):
269269
deflight_filter_pie(ax):
270270
fracs= [15,30,45,10]
271271
explode= (0.1,0.2,0.1,0.1)
272-
pies=ax.pie(fracs,explode=explode)
272+
pie=ax.pie(fracs,explode=explode)
273273

274274
light_filter=LightFilter(9)
275-
forpinpies[0]:
275+
forpinpie.wedges:
276276
p.set_agg_filter(light_filter)
277277
p.set_rasterized(True)# to support mixed-mode renderers
278278
p.set(ec="none",
279279
lw=2)
280280

281281
gauss=DropShadowFilter(9,offsets=(3,-4),alpha=0.7)
282-
shadow=FilteredArtistList(pies[0],gauss)
282+
shadow=FilteredArtistList(pie.wedges,gauss)
283283
ax.add_artist(shadow)
284-
shadow.set_zorder(pies[0][0].get_zorder()-0.1)
284+
shadow.set_zorder(pie.wedges[0].get_zorder()-0.1)
285285

286286

287287
if__name__=="__main__":

‎galleries/examples/pie_and_polar_charts/bar_of_pie.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
explode= [0.1,0,0]
2626
# rotate so that first wedge is split by the x-axis
2727
angle=-180*overall_ratios[0]
28-
wedges,*_=ax1.pie(overall_ratios,autopct='%1.1f%%',startangle=angle,
29-
labels=labels,explode=explode)
28+
pie=ax1.pie(overall_ratios,autopct='%1.1f%%',startangle=angle,
29+
labels=labels,explode=explode)
3030

3131
# bar chart parameters
3232
age_ratios= [.33,.54,.07,.06]
@@ -47,8 +47,8 @@
4747
ax2.set_xlim(-2.5*width,2.5*width)
4848

4949
# use ConnectionPatch to draw lines between the two plots
50-
theta1,theta2=wedges[0].theta1,wedges[0].theta2
51-
center,r=wedges[0].center,wedges[0].r
50+
theta1,theta2=pie.wedges[0].theta1,pie.wedges[0].theta2
51+
center,r=pie.wedges[0].center,pie.wedges[0].r
5252
bar_height=sum(age_ratios)
5353

5454
# draw top connecting line

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp