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

Functionalizing examples/pie_and_polar_charts #3577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
functionalize polar_bar_demo
  • Loading branch information
MC-Escherichia committed Sep 27, 2014
commit 26f44f862361c8bba3c89a455175630e27d8a8e5
24 changes: 15 additions & 9 deletions 24 examples/pie_and_polar_charts/polar_bar_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@


N = 20
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
radii = 10 * np.random.rand(N)
width = np.pi / 4 * np.random.rand(N)
ex_theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
ex_radii = 10 * np.random.rand(N)
ex_width = np.pi / 4 * np.random.rand(N)

ax = plt.subplot(111, polar=True)
bars = ax.bar(theta, radii, width=width, bottom=0.0)

def polar_bar_demo(theta,radii,width):

ax = plt.subplot(111, polar=True)
bars = ax.bar(theta, radii, width=width, bottom=0.0)

# Use custom colors and opacity
for r, bar in zip(radii, bars):
bar.set_facecolor(plt.cm.jet(r / 10.))
bar.set_alpha(0.5)
for r, bar in zip(radii, bars):
bar.set_facecolor(plt.cm.jet(r / 10.))
bar.set_alpha(0.5)

plt.show()
return ax

plt.show()
polar_bar_demo(ex_theta,ex_radii,ex_width)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.