Dear all,
This is probably a silly question based on my bias from matlab, but I have
tried for two days without luck. I need to make pcolor plots in several
figures, and the go back and add a scatter on each. This procedure is necessary
due to how I read the data. My problem is that I can't figure out how update
the colorbar in the end.
An example is as follows:
#=====
import random
import pylab as pl
import numpy as np
from numpy.random import rand
def pcl(fig,val):
pl.figure(fig)
pl.clf()
pl.pcolor(val)
pl.colorbar()
def sct(fig,xvec,yvec,cvec):
pl.figure(fig)
pl.scatter(xvec,yvec,40,cvec)
pl.xlim(0,10)
pl.ylim(0,10)
pl.colorbar(orientation='horizontal')
pcl(1, rand(20,20)*10)
pcl(2, rand(20,20)*10)
pcl(3, rand(20,20)*10)
sct(1,rand(10)*10,rand(10)*10,rand(10)*40)
sct(2,rand(10)*10,rand(10)*10,rand(10)*40)
sct(3,rand(10)*10,rand(10)*10,rand(10)*40)
#=====
I would like the pcolor image and the colorbar to have the same clim extents as
the scatter in the end. Is this in any way possible?
Many thanks for any help!
:-)Bror
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users