|
From: Tony Yu <ts...@gm...> - 2009-07-31 13:26:06
|
Sorry for sending this twice, John; I forgot to copy the list.
On Jul 31, 2009, at 9:14 AM, John Hunter wrote:
> On Thu, Jul 30, 2009 at 10:01 AM, Tony Yu<ts...@gm...> wrote:
>> Sorry for reposting, but the original may have been overlooked since
>> it was buried deep in a matplotlib-users thread.
>>
>> Currently, `pyplot.rgrids` is returning tick lines instead of grid
>> lines. My guess is that this is a typo, but there may be a compelling
>> reason to return the tick lines. If it is a typo, here's a patch:
>>
>
> Doesn't pyplot.rgrids need to be fixed too:
>
>
>
> def rgrids(*args, **kwargs):
> """
[Snip]
>
> Should
>
> lines = ax.yaxis.get_ticklines()
>
> be
>
> lines = ax.yaxis.get_gridlines()
>
>
> I'm going to make both these changes in svn , but I'd like you to
> confirm this.
Yes, that's correct. I called `rgrids` with arguments so I completely
missed that call to `get_ticklines`. However, I think there's a typo
in svn: yaxis.gridlines is called instead of yaxis.get_gridlines().
-T
Index: lib/matplotlib/pyplot.py
===================================================================
--- lib/matplotlib/pyplot.py (revision 7313)
+++ lib/matplotlib/pyplot.py (working copy)
@@ -1102,7 +1102,7 @@
if not isinstance(ax, PolarAxes):
raise RuntimeError('rgrids only defined for polar axes')
if len(args)==0:
- lines = ax.yaxis.gridlines()
+ lines = ax.yaxis.get_gridlines()
labels = ax.yaxis.get_ticklabels()
else:
lines, labels = ax.set_rgrids(*args, **kwargs)
|