Hi Bob, Le 17/12/2012 19:09, Bob Dowling a écrit : > > I am plotting a polar graph with some negative values of r. > Everything goes well until I try to use rgrids(). Am I doing > something wrong? I just noticed that calling rgrids *after* plotting works nicely for me:
subplot(111, polar=True) polar(t, r) rgrids([2,4,6]) However, calling rgrids before plotting indeed leads to a weird situation where only half of the curve is plotted. After digging in the source code, this may relate to the `use_rmin` parameter in the PolarTransform class init (in matplotlib.projections.polar) In the tranform_non_affine method I see # line 40-42: if self._axis is not None: if self._use_rmin: rmin = self._axis.viewLim.ymin # [...] if rmin != 0: r = r - rmin mask = r < 0 x[:] = np.where(mask, np.nan, r * np.cos(t)) y[:] = np.where(mask, np.nan, r * np.sin(t)) else: x[:] = r * np.cos(t) y[:] = r * np.sin(t) Maybe this the code behind the masking of half your curve, but I don't know more. Best, Pierre ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users