Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e13798d

Browse files
committed
added polar bar char demo
svn path=/trunk/matplotlib/; revision=3255
1 parent 491f6cd commit e13798d

4 files changed

Lines changed: 716 additions & 656 deletions

File tree

examples/polar_bar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
theta = nx.arange(0.0, 2*nx.pi, 2*nx.pi/N)
1515
radii = 10*nx.mlab.rand(N)
1616
width = nx.pi/4*nx.mlab.rand(N)
17-
bars = ax.bar(theta, radii, width=width)
17+
bars = ax.bar(theta, radii, width=width, bottom=0.1)
1818
for r,bar in zip(radii, bars):
1919
bar.set_facecolor( cm.jet(r/10.))
2020
bar.set_alpha(0.5)
21+
2122
show()

lib/matplotlib/axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5557,7 +5557,7 @@ def draw(self, renderer):
55575557
l.set_clip_path(clippath)
55585558
l.draw(renderer)
55595559

5560-
for a in self.lines:
5560+
for a in self.lines:# + self.patches:
55615561
a.set_clip_path(clippath)
55625562

55635563
artists = []

lib/matplotlib/patches.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ def draw(self, renderer):
202202
gc.set_linewidth(self._linewidth)
203203
gc.set_alpha(self._alpha)
204204
gc.set_antialiased(self._antialiased)
205-
if self.get_clip_on():
206-
gc.set_clip_rectangle(self.clipbox.get_bounds())
205+
self._set_gc_clip(gc)
207206
gc.set_capstyle('projecting')
208207

209208
if not self.fill or self._facecolor is None: rgbFace = None
@@ -740,8 +739,8 @@ def draw(self, renderer):
740739
gc.set_linewidth(self._linewidth)
741740
gc.set_alpha(self._alpha)
742741
gc.set_antialiased(self._antialiased)
743-
if self.get_clip_on():
744-
gc.set_clip_rectangle(self.clipbox.get_bounds())
742+
self._set_gc_clip(gc)
743+
745744
gc.set_capstyle('projecting')
746745

747746
if not self.fill or self._facecolor is None: rgbFace = None

0 commit comments

Comments
 (0)