turning off tick marks

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

turning off tick marks

jeffsp
can someone tell me how to turn off the tick marks on my plot?

i tried this

    [line.set_marker('None') for line in ax.get_xticklines()]

but this turns off the labels too.  i don't want to turn off the
labels, just the tick marks.

someone also suggested this

   ax.xaxis.set_major_locator(pylab.NullLocator())

but it also turns off the labels

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: turning off tick marks

Benjamin Root-2
Try "ax.set_xticks([])", I think that works for 2D plots.

Ben Root

On Thu, Jun 17, 2010 at 11:22 AM, Jeff Perry <[hidden email]> wrote:
can someone tell me how to turn off the tick marks on my plot?

i tried this

   [line.set_marker('None') for line in ax.get_xticklines()]

but this turns off the labels too.  i don't want to turn off the
labels, just the tick marks.

someone also suggested this

  ax.xaxis.set_major_locator(pylab.NullLocator())

but it also turns off the labels

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: turning off tick marks

Ryan May-3
On Thu, Jun 17, 2010 at 11:39 AM, Benjamin Root <[hidden email]> wrote:
> Try "ax.set_xticks([])", I think that works for 2D plots.

Nope, labels disappear.

Jeff, try this:

ax.xaxis.set_ticks_position('none')

Ryan

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: turning off tick marks

Eric Firing
On 06/17/2010 07:35 AM, Ryan May wrote:

> On Thu, Jun 17, 2010 at 11:39 AM, Benjamin Root<[hidden email]>  wrote:
>> Try "ax.set_xticks([])", I think that works for 2D plots.
>
> Nope, labels disappear.
>
> Jeff, try this:
>
> ax.xaxis.set_ticks_position('none')
>
> Ryan
>

In [1]:plot([1,2])
Out[1]:[<matplotlib.lines.Line2D object at 0x3e11510>]

In [2]:ax = gca()

In [3]:for t in ax.xaxis.get_ticklines(): t.set_visible(False)
    ...:

In [4]:draw()


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users