Hi Andre,

You should be able to set the size with the following:

params = {'length': 10}
axis = plt.axes().xaxis
axis.set_tick_params(which='major', **params)

You can also use 'minor' instead of 'major' to set the minor ticks.  There are a number of different valid values for the params dict, including direction, width, and color.

Ben

On Thu, Jul 28, 2011 at 2:22 PM, Andre' Walker-Loud <walksloud@gmail.com> wrote:
Hi All,

I am trying to modify tick sizes and labels.  Reading documents and examples, I have found an easy way to modify the labels,

> import matplotlib.pyplot as plt
>
> ax = plt.axes()
> font_size = 24
>
> plt.setp(ax.get_xticklabels(),fontsize=font_size)


but I am struggling to find such a nice solution for the tick size.  I would like to change the size of the major and minor ticks independently.  But the best I have come up with so far is a brute force double loop (I tried calling "major=False" but "major" is not a recognized kwarg)

> for tick in ax.xaxis.get_ticklines(minor=True):
>     tick.set_markersize(5)
> for tick in ax.xaxis.get_ticklines(minor=False):
>     tick.set_markersize(10)


I assume there is some nice solution like for the tick labels, but I have not found it.

Anyone figured this one out yet?


Thanks,

Andre
------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users