Y axis label overlaps with ticks when using Wx (UNCLASSIFIED)

Classification: UNCLASSIFIED
Caveats: NONE

Howdy,

When using Wx as the backend and plotting a line: the y axis label is
overlapping with the y axis ticks. This only appears to happen when
using Wx; when using Tk, the label appears as expected.

I have tried many things suggested by mail archives and Google searches:

1. Change font size/face in ticks.
2. Change font size/face in label.
3. Use subplots_adjust.
4. Use custom axes.

The label still ALWAYS overlaps the ticks. It looks like the label is
being rendered on top of the ticks no matter what location the ticks are
at.

Am I missing something or is this a bug?

Sample of what I'm trying to do:

···

--------------------------
import matplotlib
matplotlib.use('Wx')

import pylab

pylab.title ("Intial Velocity vs Residual Velocity")
pylab.xlabel ("Initial Velocity")

#There is a bug in matplotlib -- the ylabel overlaps the yticks
#when using Wx
pylab.ylabel ("Residual Velocity", verticalalignment='top')

pylab.plot ([1, 2, 3, 4], [1, 2, 3, 4])

pylab.show ()
--------------------------

Thanks ahead of time,

Michael Day
Simulation Technologies, Inc.
Building 5400 Room C228
Redstone Arsenal, AL 35898

Classification: UNCLASSIFIED
Caveats: NONE

Is it possible for you to use WXAgg -- this is the recommended backend
for wx users. The only advantage of native wx that I am aware of is
when running under X11 in some environments.

JDH

···

On Nov 14, 2007 11:31 AM, Day, Michael A. AMRDEC/SimTech <mike.a.day@...1783...> wrote:

Sample of what I'm trying to do:

--------------------------
import matplotlib
matplotlib.use('Wx')

Classification: UNCLASSIFIED
Caveats: NONE

Yep, I can use that.

Not only did that solve the yaxis label issue, EVERYTHING works much
better now. Under "Wx" there was some delay when resizing the window,
and the lines didn't look as good.

Thanks a lot!

···

-----Original Message-----
From: John Hunter [mailto:jdh2358@…287…]
Sent: Wednesday, November 14, 2007 12:35 PM
To: Day, Michael A. AMRDEC/SimTech
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Y axis label overlaps with ticks when
using Wx (UNCLASSIFIED)

On Nov 14, 2007 11:31 AM, Day, Michael A. AMRDEC/SimTech <mike.a.day@...1783...> wrote:

Sample of what I'm trying to do:

--------------------------
import matplotlib
matplotlib.use('Wx')

Is it possible for you to use WXAgg -- this is the recommended backend
for wx users. The only advantage of native wx that I am aware of is
when running under X11 in some environments.

JDH
Classification: UNCLASSIFIED
Caveats: NONE

Wx rotates text around a different origin (the upper left) than most of the other backends (the lower left). I've added a bit of code to correct for this.

But I also second John's suggestion about using WxAgg if you can.

Cheers,
Mike

Day, Michael A. AMRDEC/SimTech wrote:

···

Classification: UNCLASSIFIED Caveats: NONE

Howdy,

When using Wx as the backend and plotting a line: the y axis label is
overlapping with the y axis ticks. This only appears to happen when
using Wx; when using Tk, the label appears as expected.

I have tried many things suggested by mail archives and Google searches:

1. Change font size/face in ticks.
2. Change font size/face in label.
3. Use subplots_adjust.
4. Use custom axes.

The label still ALWAYS overlaps the ticks. It looks like the label is
being rendered on top of the ticks no matter what location the ticks are
at.

Am I missing something or is this a bug?

Sample of what I'm trying to do:

--------------------------
import matplotlib
matplotlib.use('Wx')

import pylab

pylab.title ("Intial Velocity vs Residual Velocity")
pylab.xlabel ("Initial Velocity")

#There is a bug in matplotlib -- the ylabel overlaps the yticks
#when using Wx
pylab.ylabel ("Residual Velocity", verticalalignment='top')

pylab.plot ([1, 2, 3, 4], [1, 2, 3, 4])

pylab.show ()
--------------------------

Thanks ahead of time,

Michael Day
Simulation Technologies, Inc.
Building 5400 Room C228
Redstone Arsenal, AL 35898

Classification: UNCLASSIFIED Caveats: NONE

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA