On Friday, June 20, 2014 9:46:29 AM UTC+1, Jamie Mitchell wrote:
> Hi folks,
>
>
>
> I'm trying to plot a 2D histogram but I'm having some issues:
>
> from pylab import *
>
> import numpy as np
>
> import netCDF4
>
> hist,xedges,yedges=np.histogram2d(x,y,bins=10)
>
> extent=[xedges[0],xedge
Jamie Mitchell wrote:
> On Friday, June 20, 2014 12:00:15 PM UTC+1, Peter Otten wrote:
>> Jamie Mitchell wrote:
>>
>>
>>
>> > I have changed my x and y data to float64 types but I am still getting
>> > the
>>
>> > same error message?
>>
>>
>>
>> Please double-check by adding
>>
>>
>>
>>
On Friday, June 20, 2014 12:00:15 PM UTC+1, Peter Otten wrote:
> Jamie Mitchell wrote:
>
>
>
> > I have changed my x and y data to float64 types but I am still getting the
>
> > same error message?
>
>
>
> Please double-check by adding
>
>
>
> assert x.dtype == np.float64
>
> assert y.dt
Jamie Mitchell wrote:
> I have changed my x and y data to float64 types but I am still getting the
> same error message?
Please double-check by adding
assert x.dtype == np.float64
assert y.dtype == np.float64
If none of these assertions fail try to make a minimal script including some
data tha
On Friday, June 20, 2014 10:25:44 AM UTC+1, Peter Otten wrote:
> Jamie Mitchell wrote:
>
>
>
> > Hi folks,
>
> >
>
> > I'm trying to plot a 2D histogram but I'm having some issues:
>
> > from pylab import *
>
> > import numpy as np
>
> > import netCDF4
>
> > hist,xedges,yedges=np.histogra
Jamie Mitchell wrote:
> Hi folks,
>
> I'm trying to plot a 2D histogram but I'm having some issues:
> from pylab import *
> import numpy as np
> import netCDF4
> hist,xedges,yedges=np.histogram2d(x,y,bins=10)
> extent=[xedges[0],xedges[-1],yedges[0],yedges[-1]]
> imshow(hist.T,extent=extent,inter
Hi folks,
I'm trying to plot a 2D histogram but I'm having some issues:
from pylab import *
import numpy as np
import netCDF4
hist,xedges,yedges=np.histogram2d(x,y,bins=10)
extent=[xedges[0],xedges[-1],yedges[0],yedges[-1]]
imshow(hist.T,extent=extent,interpolation='nearest')
colorbar()
show()
Af