On Jul 28, 2009, at 4:53 PM, Josh Hemann wrote:

> One small nit: I
> don't see any code to set the color or alpha level of the grid  
> lines. In my
> example, I set the color to be a light grey because I wanted the  
> grid lines
> to be seen but not be distracting from the data. Just a preference.


Good point. It turns out the grid lines are already pretty faint on my  
computer, so I didn't need to adjust this. The most obvious thing to  
do is replace

 >>> plt.rgrids(radial_grid)

with

 >>> lines, labels = plt.rgrids(radial_grid)
 >>> plt.setp(lines, alpha=0.4)

**However**, this modification doesn't help. In fact, nothing I did to  
the gridlines changed their appearance. Out of frustration, I went to  
the code and found that `rgrids` calls *get_ticklines* instead of  
*get_gridlines*. My guess is that this is a typo, but there may be a  
compelling reason to return the tick lines. If that's not the case,  
here's a ridiculously simple patch:

Index: lib/matplotlib/projections/polar.py
===================================================================
--- lib/matplotlib/projections/polar.py (revision 7300)
+++ lib/matplotlib/projections/polar.py (working copy)
@@ -397,7 +397,7 @@
          self._r_label2_position.clear().translate(angle, -self._rpad  
* rmax)
          for t in self.yaxis.get_ticklabels():
              t.update(kwargs)
-        return self.yaxis.get_ticklines(), self.yaxis.get_ticklabels()
+        return self.yaxis.get_gridlines(), self.yaxis.get_ticklabels()

      set_rgrids.__doc__ = cbook.dedent(set_rgrids.__doc__) % kwdocd


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to