On Sun, Jan 29, 2012 at 10:10 PM, C M <cmpyt...@gmail.com> wrote:

>
>
> On Wed, Jan 4, 2012 at 2:19 PM, Benjamin Root <ben.r...@ou.edu> wrote:
>
>>
>>
>> On Wednesday, January 4, 2012, jeffsp <jef...@gmail.com> wrote:
>> >
>> > plt.tight_layout(), sweet
>> >
>> > it still makes the labels too close to read, even if they don't overlap.
>> > that is, they're just a continuous string of numbers with no whitespace
>> > between.
>> >
>> > it does clean up the rest of the plot really nicely, though, without
>> having
>> > to continually dick around with subplots_adjust
>> >
>> >
>>
>> Well, it is a new feature with plenty of room for improvements.  Maybe
>> some sort of mindist parameter would be useful to establish a minimum
>> distance between text objects?
>>
>> Ben Root
>>
>>
> Something like that sounds good.  If there were a way to make it the
> default that labels would never overlap (but that default could be toggled
> for those who, somehow, want to not be able to read their labels?), that
> strikes me as best.
>
> In the meantime, what are other ways to do this?
>
>
Just to clarify, I don't think improvements to `tight_layout` will fix your
issues with tick layout; `tight_layout` adjusts the subplot spacing, not
the spacing of tick labels.

If you just want to prevent overlap in the static case, you can just set
the tick labels yourself, e.g. `plt.xticks([1, 2, 3])`. If you want
something automatic and dynamic, ...

I believe this is actually a pretty difficult problem to solve in the
general case. I've implemented a hacky attempt
here<https://gist.github.com/1708133>,
but it leaves out a lot of common use cases (e.g. subplots) and doesn't
account for spacing between the axes and figure.

-Tony
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to