Are you using the axes_grid toolkit?
Standard matplotlib axis instance does not have "major_ticklabels"
attribute, while axes_grid axis does.

Please post a simple, but complete example that can be run and tested.
Regards,

-JJ


On Sun, Jan 31, 2010 at 11:06 AM,  <kc106_2005-matplot...@yahoo.com> wrote:
> BTW: I tried to use set_position to change the position of the axes label as 
> suggested by previous posting.  No effect.
>
> ----- Original Message ----
>> > Hello,
>> >
>> > I am creating a plot with multiple y-axis (up to 6) and twinx
>> works pretty well. The problem is that there are too much wasted spaces used 
>> up
>> by the axes. Since I have multiple axes, it cuts into the amount of space
>> available for the plot area. I need to know how I can squeeze some spaces 
>> out of
>> the standard axes. First thing I discovered was that I can rotate the tick
>> labels to vertical by:
>> >
>> > plt.setp(ax.major_ticklabels, rotation="vertical")
>> >
>> > where ax is my y-axis. But then:
>> >
>> > (1) How to reduce the space between the tick and the axes label?
>> >
>> > First I tried to place the label on top but couldn't get that to work. 
>> > Then I
>> tried to change the position property of the axis label object and that have 
>> no
>> effect. So, can somebody please tell me how I can do these 2 things?
>> >
>> > (2) How to avoid overlapping tick labels?
>> >
>> > With the way the standard x and y axis are drawn, after I do a vertical 
>> > rotate
>> of the y tick labels, the first y tick label overlaps with the last x tick 
>> label
>> since they are both center aligned. Is there any way to change the alignment 
>> of
>> only the first and last tick labels of an axes (while keeping the rest center
>> aligned)?
>> >
>> > Thanks,
>> >
>>
>>
>
>  --
> John Henry
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to