Removing ticks and frame (imshow)

From: "Marianne C." <mariyanna.c@...287...>
Date: November 24, 2011 6:48:34 AM PST
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] Removing ticks and frame (imshow)

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
I use imshow in axes.Axes instead, to be able to call
set_ticks_position("none")?
Thank you for your help,
Marianne

Here is the code so far:

import numpy
from matplotlib import pyplot

q=numpy.loadtxt('field.txt')

myfield = pyplot.imshow(q,aspect=1)
myfield.set_clim(vmin=0, vmax=0.6)

pyplot.colorbar()

pyplot.savefig('field_1.eps')

<field_1.pdf>

Marianne,

Try

myfield.get_axes().axis('off')

-Sterling