Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Armin Moser
Sebastian Busch schrieb: > Armin Moser wrote: >> Sebastian Busch wrote: >>> ... >>> array([list(a[i,:i])+list(b[i,i:]) for i in range(a.shape[0])]) >> It seems that I did not understand what you tried to reach. >> ... > > Sorry. I wanted to do the same as Matthias -- taking his example: I meant I

Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Sebastian Busch
Armin Moser wrote: > Sebastian Busch wrote: >> ... >> array([list(a[i,:i])+list(b[i,i:]) for i in range(a.shape[0])]) > It seems that I did not understand what you tried to reach. > ... Sorry. I wanted to do the same as Matthias -- taking his example: = from scipy import ones, array matrix1

Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Bala subramanian
Thank you Matthias, Sebastin and Armin!!! My matrices are square matrices and not rectangular one. I tried the way of creating a new matrix from existing ones as suggested by matthias and it worked great. I will try the masked array method too. Thank you all once again, Bala On Wed, May 13, 200

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Armin Moser
Sebastian Busch wrote: > Matthias Michler wrote: >> ... >> for i in xrange(len(matrix3[:, 0])): # all rows >> for j in xrange(len(matrix3[0, :])):# all columns >> ... > > if your matrices a and b are rectangular (and i think the "diagonal" > makes only sense in this case), you can also say: >

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Sebastian Busch
Matthias Michler wrote: > ... > for i in xrange(len(matrix3[:, 0])): # all rows > for j in xrange(len(matrix3[0, :])):# all columns > ... if your matrices a and b are rectangular (and i think the "diagonal" makes only sense in this case), you can also say: array([list(a[i,:i])+list(b[i,i:]) f

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Matthias Michler
Hi Bala, I'm not sure I understand, what you want, but maybe the following goes towards your direction # initialise two matrices with data matrix1 = ones((4,4)) matrix2 = 2*ones((4,4)) # and one empty matrix matrix3 = zeros((4, 4)) for i in xrange(len(matrix3[:, 0])): # all rows for j in x

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Armin Moser
Bala subramanian schrieb: > hai Armin, > > I looked through the examples. I could not find any example of overlapping > two differnet countours on the same plot. I think the first example filled contours does exactly that. You want to show two contours over each other in the same plot. You just ha

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Armin Moser
Bala subramanian schrieb: > Dear Matthias, > > Thank you for the information. Could you please provide me a small example > of such overlapping. Look at http://matplotlib.sourceforge.net/examples/pylab_examples/contour_image.html or any other contour example from this page: http://matplotlib.sour

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Bala subramanian
Dear Matthias, Thank you for the information. Could you please provide me a small example of such overlapping. Thanks, Bala On Wed, May 13, 2009 at 1:50 PM, Matthias Michler wrote: > Hi Bala, > > On Wednesday 13 May 2009 13:16:17 Bala subramanian wrote: > > Friends, > > > > I have two matrices

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Matthias Michler
Hi Bala, On Wednesday 13 May 2009 13:16:17 Bala subramanian wrote: > Friends, > > I have two matrices of same size. I used contourf to create the countour > plots for the two matrices separately. > > i) I am interested in making one countour plot marking the areas which are > different in both th

[Matplotlib-users] contour overlapping

2009-05-13 Thread Bala subramanian
Friends, I have two matrices of same size. I used contourf to create the countour plots for the two matrices separately. i) I am interested in making one countour plot marking the areas which are different in both the countours or ii) Overlapping one countour over the other, so that i can compa