On Wed, Mar 9, 2011 at 10:05 AM, Muffles <dantares...@gmail.com> wrote:

>
>
>
> Benjamin Root-2 wrote:
> >
> >
> > And, without the code, I can't help you.  Please include a small script
> > that
> > I can run that demonstrates the problem.  I can't reproduce your bug
> based
> > on your description.
> >
> > Ben Root
> >
> >
>
> Here it is, i think this works
>
> fig=figure(figsize=(5,9))
>
> pcolor(rand(1000,60))
>
> ax = fig.gca()
> ax.set_yticks(np.arange(0, 1000, 100)) #define a legenda dos eixos
> ax.set_yticklabels([0,1,2,3,4,5,6,7,8,9,10])
> plt.axis((0,60,0,1000)) #corta os eixos
>
> cax = axes([0.93, 0.1, 0.15, 0.8]) # setup colorbar axes
> colorbar(cax=cax) # draw colorbar
>
> plt.show()
>

Try this.  It is a lot cleaner:

import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure(figsize=(5, 9))
ax = fig.gca()

pc = ax.pcolor(np.random.rand(1000, 60))
ax.set_yticks(np.arange(0, 1000, 100))
ax.set_yticklabels(range(11))
ax.set_xlim(0, 60)
ax.set_ylim(0, 1000)

fig.colorbar(pc)

plt.show()

I hope that helps!
Ben Root
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to