Clipping the bottom labels

Hi,

I made a plot where the values on the X-axis are dates, "JUN, JUL, AUG.. etc ".
To make them fit better, I have rotated the text using setp(labels,
rotation=45, size=8), the problem is that the text is "clipped" in bottom. How
can I expand the boundries? Thanks !!

figure(num=1, figsize=(2,2))
#xlabel('Tid')
ylabel('Temp', size=8)
title('Frysertemperatur', size = 10)
p = plot(dates, s)
ax = subplot(111)
ax.set_clip_on(False)
ax.xaxis.set_major_locator(days)
ax.xaxis.set_major_formatter(daysFmt)
#ax.xaxis.set_minor_locator(hours)
labels = ax.get_xticklabels()
setp(labels, rotation=45, size=8)
labels = ax.get_yticklabels()
setp(labels, size=8)
grid(True)
savefig('simple_plot')
show()

Sincerely
JFØ

Hi,

I made a plot where the values on the X-axis are dates, "JUN, JUL,
AUG.. etc ". To make them fit better, I have rotated the text using
setp(labels, rotation=45, size=8), the problem is that the text is
"clipped" in bottom. How can I expand the boundries? Thanks !!

Instead of this...

ax = subplot(111)

Try this...
fig = figure(num=1, figsize=(2,2))
ax = fig.add_axes([left, bottom, width, height])

Start with left=0.1, bottom=0.1, width=0.8, height=0.8 and see how
that looks. Adjust the values of bottom and/or height until your
labels are no longer clipped.

···

On Friday 23 June 2006 8:12 pm, Johan Fredrik Øhman wrote:

I have a similar problem because I use bigfonts. If you are going to
make a lot of these plots, you can change the default for left,
bottom, height, and width in your matplotlibrc file. Look for the
lines:

figure.subplot.left : 0.15 #0.125 # the left side of the subplots of
the figure
figure.subplot.right : 0.925 # the right side of the subplots of the figure
figure.subplot.bottom : 0.125 # the bottom of the subplots of the figure
figure.subplot.top : 0.925 # the top of the subplots of the figure

matplotlib looks for this rc file first in the working directory and
then in your home directory (possibly looking in other places along
the way). So, you could put a copy of matplotlibrc in the directory
where you are making a lot of these plots if you don't want to change
the bottom setting for all your plots.

Ryan

···

On 6/23/06, ddlucas@...1089... <ddlucas@...1089...> wrote:

On Friday 23 June 2006 8:12 pm, Johan Fredrik Øhman wrote:
> Hi,
>
> I made a plot where the values on the X-axis are dates, "JUN, JUL,
> AUG.. etc ". To make them fit better, I have rotated the text using
> setp(labels, rotation=45, size=8), the problem is that the text is
> "clipped" in bottom. How can I expand the boundries? Thanks !!
>

Instead of this...
> ax = subplot(111)

Try this...
fig = figure(num=1, figsize=(2,2))
ax = fig.add_axes([left, bottom, width, height])

Start with left=0.1, bottom=0.1, width=0.8, height=0.8 and see how
that looks. Adjust the values of bottom and/or height until your
labels are no longer clipped.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users