Hi Friedrich and everybody else,

Thank you for your reply.

I think I am not getting everything, but in my understanding,
the object which I create is not a Figure or an Axis, it is an
AxesImage.  gca() or gcf() return errors indeed.

Therefore, I cannot use attributes which are specific to Figures
and Axes.

Would there be a reason for the class AxesImage to handle
very few attributes?  Is this class not so popular? :p

Best,
Marianne


On Thu, Nov 24, 2011 at 8:09 PM, Friedrich Romstedt <
friedrichromst...@gmail.com> wrote:

> 2011/11/24 Marianne C. <mariyann...@gmail.com>:
> > On Thu, Nov 24, 2011 at 3:48 PM, Marianne C. <mariyann...@gmail.com>
> wrote:
> >> Hi all,
> >>
> >> My name is Marianne, I am a beginner user of matplotlib.
> >> I am using imshow in pyplot.  I am desperate to get rid of
> >> the ticks on both x and y axes (see attached picture).  I
> >> do not need the black box around the data either.  Should
>
> The cleanes solution, is to use the NullLocator.  I'm not a user of
> pylab Matlabish interface, but from what I know::
>
>   gca().xaxis.set_major_locator(matplotlib.ticker.NullLocator())
>   gca().yaxis.set_major_locator(matplotlib.ticker.NullLocator())
>
> after importing matplotlib.ticker of course.  Should work, but didn't try.
>
> http://matplotlib.sourceforge.net/api/ticker_api.html
>
> http://matplotlib.sourceforge.net/api/axis_api.html#matplotlib.axis.Axis.set_major_locator
> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.gca
>
> You are free to use the OO interface which yields the same.
>
> Notice that upon clear() the locators are most probably lost.
>
> gca() get the current Axes object.  xaxis and yaxis are its Axis
> attributes.  The locator defines where to set ticks.  If it's the
> NoneLocator this is rather a stub to saying "don't place ticks ever".
> But it's more clean than to force them directly to the empty list
> because it'll survive at least limit changes.  I don't know if the
> manual method survives that.  Otherwise it's also a matter of taste.
>
> From the docs I do not see that you could hand over the locators
> directly to the imshow call
>
> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow
> .
>
> For the frame, if it really matters, you can set the ``edgecolor``
> probably to 'none', literally with the quotes.  There's a Figure
> object created when you create the plot, you can get it via gcf().
> Try to figure out how to set its egdecolor either on construction or
> later.  If you are stuck tell.
>
> Make sure to "reply to all".
>
> cu,
> Friedrich
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to