Re: Matplotlib Contour Plots

2014-08-20 Thread Mark Lawrence
On 20/08/2014 11:02, Jamie Mitchell wrote: This is great and works very well - thank you!! I'm pleased to see that you have answers. In return would you please access this list via https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/Go

Re: Matplotlib Contour Plots

2014-08-20 Thread Jamie Mitchell
On Tuesday, August 19, 2014 10:21:48 PM UTC+1, pec...@pascolo.net wrote: > Jamie Mitchell writes: > > > > > You were right Christian I wanted a shape (2,150). > > > > > > Thank you Rustom and Steven your suggestion has worked. > > > > > > Unfortunately the data doesn't plot as I imagined. >

Re: Matplotlib Contour Plots

2014-08-19 Thread pecore
Jamie Mitchell writes: > You were right Christian I wanted a shape (2,150). > > Thank you Rustom and Steven your suggestion has worked. > > Unfortunately the data doesn't plot as I imagined. > > What I would like is: > > X-axis - hs_con_sw > Y-axis - te_con_sw > Z-axis - Frequency > > What I woul

Re: Matplotlib Contour Plots

2014-08-19 Thread Jamie Mitchell
You were right Christian I wanted a shape (2,150). Thank you Rustom and Steven your suggestion has worked. Unfortunately the data doesn't plot as I imagined. What I would like is: X-axis - hs_con_sw Y-axis - te_con_sw Z-axis - Frequency What I would like is for the Z-axis to contour the freque

Re: Matplotlib Contour Plots

2014-08-18 Thread Steven D'Aprano
Jamie Mitchell wrote: > I forgot to mention that when I try: > > a=np.array([[hs_con_sw],[te_con_sw]]) > > I get a 3D shape for some reason - (2,1,150) which is not what I'm after. No need to wrap the arrays hs_con_sw and te_con_sw in [] lists, since they're already arrays. a = np.array([hs_co

Re: Matplotlib Contour Plots

2014-08-18 Thread Christian Gollwitzer
Am 18.08.14 18:51, schrieb Jamie Mitchell: On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote: So I have two 1D arrays: 1st array - ([8, 8.8,8.5,7.9,8.6 ...], dtype=float32) It has a shape (150,) 2nd array - ([2, 2.2, 2.5, 2.3, ...],dtype=float32) It has a shape (150,) What I

Re: Matplotlib Contour Plots

2014-08-18 Thread Rustom Mody
On Monday, August 18, 2014 10:25:15 PM UTC+5:30, Jamie Mitchell wrote: > I forgot to mention that when I try: > a=np.array([[hs_con_sw],[te_con_sw]]) > I get a 3D shape for some reason - (2,1,150) which is not what I'm after. I guess you want a=np.array([hs_con_sw,te_con_sw]) ?? -- https://ma

Re: Matplotlib Contour Plots

2014-08-18 Thread Jamie Mitchell
I forgot to mention that when I try: a=np.array([[hs_con_sw],[te_con_sw]]) I get a 3D shape for some reason - (2,1,150) which is not what I'm after. Thanks, Jamie -- https://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib Contour Plots

2014-08-18 Thread Jamie Mitchell
On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote: > Jamie Mitchell wrote: > > > > > I created the 2D array which read as: > > > > That's not a 2D array. > > > > When the amount of data you have is too big to clearly see what it > > happening, replace it with something sm

Re: Matplotlib Contour Plots

2014-08-18 Thread Anssi Saari
Jamie Mitchell writes: > I created the 2D array which read as: Maybe you could try numpy.reshape() on your 1D array? -- https://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib Contour Plots

2014-08-15 Thread Steven D'Aprano
Jamie Mitchell wrote: > I created the 2D array which read as: That's not a 2D array. When the amount of data you have is too big to clearly see what it happening, replace it with something smaller. Instead of 30 items per sub-array, try it with 5 items per sub-array. Instead of eight decimal pla

Re: Matplotlib Contour Plots

2014-08-15 Thread Jamie Mitchell
On Friday, August 15, 2014 2:23:25 PM UTC+1, Steven D'Aprano wrote: > Jamie Mitchell wrote: > > > > [...] > > > I just want to get a contour plot of two numpy arrays. > > > When I call plt.contour on my data I get "input must be a 2D array" > > > > You are providing a 1D array, or possibly

Re: Matplotlib Contour Plots

2014-08-15 Thread Steven D'Aprano
Jamie Mitchell wrote: [...] > I just want to get a contour plot of two numpy arrays. > When I call plt.contour on my data I get "input must be a 2D array" You are providing a 1D array, or possibly a 3D array. So the question you really want to ask is not "How do I do contour plots" but "how do I

Re: Matplotlib Contour Plots

2014-08-15 Thread Jamie Mitchell
On Thursday, August 14, 2014 5:53:09 PM UTC+1, Steven D'Aprano wrote: > Jamie Mitchell wrote: > > > > > Hello all, > > > > > > I want to contour a scatter plot but I don't know how. > > > > > > Can anyone help me out? > > > > Certainly. Which way did you come in? > > > > :-) > > >

Re: Matplotlib Contour Plots

2014-08-14 Thread Steven D'Aprano
Jamie Mitchell wrote: > Hello all, > > I want to contour a scatter plot but I don't know how. > > Can anyone help me out? Certainly. Which way did you come in? :-) Sorry, I couldn't resist. It took me literally 20 seconds to find this by googling for "matplotlib contour plot", and it only t

Matplotlib Contour Plots

2014-08-14 Thread Jamie Mitchell
Hello all, I want to contour a scatter plot but I don't know how. Can anyone help me out? Cheers, Jamie -- https://mail.python.org/mailman/listinfo/python-list