1.1.0 changes: bug in YAxis.set_ticks_position; new show() behavior

YAxis:
The documentation (http://matplotlib.sourceforge.net/api/axis_api.html) says:

"Set the ticks position (left, right, both, default or none) 'both' sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at left. 'none' can be used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels."

To test this:

f=figure()
plot()
gca().xaxis.set_ticks_position('none')
gca().yaxis.set_ticks_position('none')
f.show()

The y labels, on my 1.0.0 distribution, disappear, because of this line of code:

        elif position == 'none':
            self.set_tick_params(which='both', right=False, labelright=False,
                                 left=False, labelleft=False)
the work-around is to execute that line without turning off the labels.

···

------------------------------------
show()

This may be an ipython problem, when running it with the -pylab option, the show method now has a Tk.mainloop(), which blocks of course. The work-around it to call the Figure.show() method instead, as above.

--Toby Burnett
University of Washington

YAxis:

The documentation (http://matplotlib.sourceforge.net/api/axis_api.html) says:

“Set the ticks position (left, right, both, default or none) ‘both’ sets the ticks to appear on both positions, but does not change the tick labels. ‘default’ resets the tick positions to the default: ticks on both positions, labels at left. ‘none’ can be used if you don’t want any ticks. ‘none’ and ‘both’ affect only the ticks, not the labels.”

To test this:

f=figure()

plot()

gca().xaxis.set_ticks_position(‘none’)

gca().yaxis.set_ticks_position(‘none’)

f.show()

The y labels, on my 1.0.0 distribution, disappear, because of this line of code:

    elif position == 'none':

        self.set_tick_params(which='both', right=False, labelright=False,

                             left=False, labelleft=False)

the work-around is to execute that line without turning off the labels.

This bug was already found and patched in both the maintenance branch and trunk (r8554 and r8555).


show()

This may be an ipython problem, when running it with the -pylab option, the show method now has a Tk.mainloop(), which blocks of course. The work-around it to call the Figure.show() method instead, as above.

–Toby Burnett

University of Washington

There have been some recent fixes with Tk (I think) and its behavior with regards to .show(). I believe the changes made it to the maintenance branch as well. You might want to download the latest tarball and install that to fix those problems.

Ben Root

···

On Sat, Aug 14, 2010 at 11:25 AM, Toby Burnett <tburnett@…3240…6…> wrote:

It is good to know that both issues have been recognized and addressed. I searched the bug list and I guess failed to use the right keyword, or just didn’t recognize the title.

However, I am not in need of help, and certainly would not do a complete reinstall, perhaps introducing new issues, when I now understand how to work around both problems. Rather I thought that one of the purposes of a user mailing list like this was to alert others, and to provide a solution for them. (I spent a good 3 hours tracking it down.) In the otherwise excellent documentation, I do not see an easy way to understand what bugs have been found in a particular distribution, especially the most recent.

–Toby Burnett

···

From: ben.v.root@…287… [mailto:ben.v.root@…287…] On Behalf Of Benjamin Root
Sent: Monday, August 16, 2010 07:46
To: Toby Burnett
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] 1.1.0 changes: bug in YAxis.set_ticks_position; new show() behavior

On Sat, Aug 14, 2010 at 11:25 AM, Toby Burnett <tburnett@…2756…> wrote:

YAxis:
The documentation (http://matplotlib.sourceforge.net/api/axis_api.html) says:

“Set the ticks position (left, right, both, default or none) ‘both’ sets the ticks to appear on both positions, but does not change the tick labels. ‘default’ resets the tick positions to the default: ticks on both positions, labels at left. ‘none’ can be used if you don’t want any ticks. ‘none’ and ‘both’ affect only the ticks, not the labels.”

To test this:

f=figure()
plot()
gca().xaxis.set_ticks_position(‘none’)
gca().yaxis.set_ticks_position(‘none’)
f.show()

The y labels, on my 1.0.0 distribution, disappear, because of this line of code:

   elif position == 'none':
       self.set_tick_params(which='both', right=False, labelright=False,
                            left=False, labelleft=False)

the work-around is to execute that line without turning off the labels.

This bug was already found and patched in both the maintenance branch and trunk (r8554 and r8555).


show()

This may be an ipython problem, when running it with the -pylab option, the show method now has a Tk.mainloop(), which blocks of course. The work-around it to call the Figure.show() method instead, as above.

–Toby Burnett
University of Washington

There have been some recent fixes with Tk (I think) and its behavior with regards to .show(). I believe the changes made it to the maintenance branch as well. You might want to download the latest tarball and install that to fix those problems.

Ben Root

It is good to know that both issues have been recognized and addressed.
I searched the bug list and I guess failed to use the right keyword, or
just didn’t recognize the title.

However, I am not in need of help, and certainly would not do a complete
reinstall, perhaps introducing new issues, when I now understand how to
work around both problems. Rather I thought that one of the purposes of
a user mailing list like this was to alert others, and to provide a
solution for them. (I spent a good 3 hours tracking it down.) In the
otherwise excellent documentation, I do not see an easy way to
understand what bugs have been found in a particular distribution,
especially the most recent.

We do appreciate bug identification, and especially when it comes with an explanation of the bug source and a suggested fix. You are correct that this is a function of the mailing list.

Bugs are reported in two ways: (1) on the mailing list, (2) on the sourceforge bug tracker. In addition, bugs are often identified by a developer, and then fixed without any report to the mailing list or the tracker. For the latter category, the only ways you can find out whether the bug has already been fixed are to search the latest CHANGELOG file and the list of commit messages, or--the definitive way--to install and test the latest svn version. Unfortunately, this is not feasible or desirable for everyone.

For access to the CHANGELOG and to the commit messages (and to all the code and history, if you like), you can use the sourceforge site

but I prefer my unofficial mercurial mirror:

http://currents.soest.hawaii.edu/hgstage/hgwebdir.cgi/mpl_hg/

or Andrew's github mirror:

Eric

···

On 08/16/2010 06:44 AM, Toby Burnett wrote:

--Toby Burnett

*From:* ben.v.root@...287... [mailto:ben.v.root@…287…] *On Behalf Of
*Benjamin Root
*Sent:* Monday, August 16, 2010 07:46
*To:* Toby Burnett
*Cc:* matplotlib-users@lists.sourceforge.net
*Subject:* Re: [Matplotlib-users] 1.1.0 changes: bug in
YAxis.set_ticks_position; new show() behavior

On Sat, Aug 14, 2010 at 11:25 AM, Toby Burnett <tburnett@...2756... > <mailto:tburnett@…2756…>> wrote:

YAxis:
The documentation (http://matplotlib.sourceforge.net/api/axis_api.html)
says:

"Set the ticks position (left, right, both, default or none) 'both' sets
the ticks to appear on both positions, but does not change the tick
labels. 'default' resets the tick positions to the default: ticks on
both positions, labels at left. 'none' can be used if you don't want any
ticks. 'none' and 'both' affect only the ticks, not the labels."

To test this:

f=figure()
plot()
gca().xaxis.set_ticks_position('none')
gca().yaxis.set_ticks_position('none')
f.show()

The y labels, on my 1.0.0 distribution, disappear, because of this line
of code:

elif position == 'none':
self.set_tick_params(which='both', right=False, labelright=False,
left=False, labelleft=False)
the work-around is to execute that line without turning off the labels.

This bug was already found and patched in both the maintenance branch
and trunk (r8554 and r8555).

    ------------------------------------
    show()

    This may be an ipython problem, when running it with the -pylab
    option, the show method now has a Tk.mainloop(), which blocks of
    course. The work-around it to call the Figure.show() method instead,
    as above.

    --Toby Burnett
    University of Washington

There have been some recent fixes with Tk (I think) and its behavior
with regards to .show(). I believe the changes made it to the
maintenance branch as well. You might want to download the latest
tarball and install that to fix those problems.

Ben Root

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options