label adjustment near plot origin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

label adjustment near plot origin

sipior
Hi all,

I've a stubborn problem with labels near the origin of my pylab plots, where
the lowest tick label on the y-axis ends up touching the leftmost tick label
on the x-axis. Now, I can certainly tweak these manually with xticks and
yticks, but is there any automatic way to make this happen? More generally,
is there a way to specify "breathing room" distance between the first/last
tick mark and the beginning/end of the axis? Or to increase the distance
between label and tick mark?

Apologies if these are FAQs: I've looked everywhere I can think of at the
moment, and am now officially stuck :-)

Cheers,

Mike Sipior


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: label adjustment near plot origin

Darren Dale-4
On Monday 29 August 2005 11:03 am, [hidden email] wrote:

> Hi all,
>
> I've a stubborn problem with labels near the origin of my pylab plots,
> where the lowest tick label on the y-axis ends up touching the leftmost
> tick label on the x-axis. Now, I can certainly tweak these manually with
> xticks and yticks, but is there any automatic way to make this happen? More
> generally, is there a way to specify "breathing room" distance between the
> first/last tick mark and the beginning/end of the axis? Or to increase the
> distance between label and tick mark?
>
> Apologies if these are FAQs: I've looked everywhere I can think of at the
> moment, and am now officially stuck :-)

Try increasing the tick.major.pad in your rc settings (and also tick.minor.pad
if needed).

Darren


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: label adjustment near plot origin

sipior
In reply to this post by sipior
> Try increasing the tick.major.pad in your rc settings

Much obliged, Darren, that was just what I needed. Another small imposition,
if I may: I'm using twinx() to get a second y-axis for a plot. It works
fine, except that the tick marks from the first axis are also present on the
right-hand side, causing a bit of a mess. Is there a way to suppress
printing the tick marks just for the right plot side? All the reading I've
done leads me to believe that this is an all-or-nothing affair, as I can
only suppress tick marks by setting yticks to the empty set, and this of
course removes all the tick marks on that axis. Am I missing something
obvious here? I noticed that the two_scales.py demo exhibits the same
behaviour (juxtaposing the two sets of ticks on the right side).

Cheers and thanks,

Mike Sipior


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: tick overlap with twinx

Darren Dale-4
On Tuesday 30 August 2005 1:37 am, [hidden email] wrote:

> > Try increasing the tick.major.pad in your rc settings
>
> Much obliged, Darren, that was just what I needed. Another small
> imposition, if I may: I'm using twinx() to get a second y-axis for a plot.
> It works fine, except that the tick marks from the first axis are also
> present on the right-hand side, causing a bit of a mess. Is there a way to
> suppress printing the tick marks just for the right plot side? All the
> reading I've done leads me to believe that this is an all-or-nothing
> affair, as I can only suppress tick marks by setting yticks to the empty
> set, and this of course removes all the tick marks on that axis. Am I
> missing something obvious here? I noticed that the two_scales.py demo
> exhibits the same behaviour (juxtaposing the two sets of ticks on the right
> side).

try this:

plot([1,2,3,4])
gca().yaxis.tick_left()
twinx()
plot([11,12,13,14])

Darren


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Loading...