panomaly.plot(kind='bar', color=colors)
>
>
>
> On Thu, Oct 29, 2015 at 5:43 AM, questions anon
> wrote:
>
>> Thanks for taking the time to respond
>>
>> I am receiving the error:
>> AttributeError: 'Series' object has no attribute 'it
st comprehension over
> the DataFrame
> colors = ['r' if row.anomaly > 0 else 'b' for i, row in
> meantempanomaly.iterrows()]
> meantempanomaly.plot(kind='bar', color=colors)
>
>
>
> On Wed, Oct 28, 2015 at 9:54 PM, questions anon
> wrote
I have calculated annual temperature anomaly and I would like to plot as a
bar plot with all values positive make red and all values negative make blue
I am using pandas and the time series data in this example are called
'anomaly'
mybarplot=anomaly.plot(kind='bar')
the data look like this:
tim
AM, Benjamin Root wrote:
>
>
> On Thu, Apr 19, 2012 at 1:21 PM, Goyo wrote:
>
>> El día 19 de abril de 2012 05:31, questions anon
>> escribió:
>> > Thank you, I was able to get it to work but only if I imported datetime
>> > within the loop, otherwi
a=mdates.DateFormatter('%Y%m')
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y%m'))
plt.xlabel("year-month")
plt.ylabel("Precipitation (mm)")
plt.title("Max monthly precipition")
plt.savefig(OutputFolder+"MaxMonthlyPrecip.png")
plt.sh
'%Y%m')
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y%m'))
plt.xlabel("year-month")
plt.ylabel("Precipitation (mm)")
plt.title("Max monthly Precipition")
plt.savefig(OutputFolder+"MaxMonthlyPrecip.png")
plt.show()
On Fri, Apr 13
Hi matplotlib list,
I am having trouble applying mdates in matplotlib.
I am not sure how to recognise that x-axis are dates like 20110101,
20110102, 20110103 etc.
Any feedback will be greatly appreciated!
below is the code I have so far:
import numpy as np
import matplotlib.pyplot as plt
from nump
excellent, thanks, that worked and was able to plot using matplotlib
without ending up with the logical_or error.
thanks everyone
On Thu, Mar 22, 2012 at 3:59 AM, Goyo wrote:
> El día 21 de marzo de 2012 01:03, questions anon
>
> > f=np.genfromtxt(inputfile, skip_header=6, dtype
0.0)]
f shape: (690,)
f dtype: [('0', '
print "f dtype: ", f.dtype[1:2]
ValueError: Field key must be an integer, string, or unicode.
On Wed, Mar 21, 2012 at 1:47 AM, Benjamin Root wrote:
>
>
> On Mon, Mar 19, 2012 at 5:28 PM, questions anon
> wrote:
>
&g
Error: total size of new array must be unchanged
Is there a way to use np.genfromtxt and define the rows and columns on
import?
Thanks
On Fri, Mar 16, 2012 at 7:10 AM, Goyo wrote:
> El día 15 de marzo de 2012 05:14, questions anon
> escribió:
> > I think my error is from the np.genfr
do I skip those first few rows but still end up with a 2D array?
On Thu, Mar 15, 2012 at 12:16 PM, questions anon
wrote:
> I don't really understand what np.logical_or is or how to use it?
> I have tried just calling it at the beginning of the script but I still
> end up with the sam
Mar 13, 2012 at 4:23 PM, questions anon
> wrote:
>
>> also I have tried running it on a different computer and the same error
>> occurred
>>
>>
>> On Wed, Mar 14, 2012 at 8:22 AM, questions anon > > wrote:
>>
>>> thanks for looking into this Goyo.
>
also I have tried running it on a different computer and the same error
occurred
On Wed, Mar 14, 2012 at 8:22 AM, questions anon wrote:
> thanks for looking into this Goyo.
> The complete code:
>
>
> import numpy as N
> import matplotlib.pyplot as plt
> from numpy i
=plt.cm.jet)
File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py",
line 3072, in contourf
np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask))
AttributeError: logical_or
Any feedback/ideas will be greatly appreciated.
On Wed, M
an ascii to
a numpy array?
thanks
On Fri, Mar 9, 2012 at 5:27 PM, Benjamin Root wrote:
>
>
> On Wednesday, March 7, 2012, questions anon
> wrote:
> > Hi all,
> > I am still having a problem with the same code. I am not sure if maybe
> the problem is how I read the
Hi all,
I am still having a problem with the same code. I am not sure if maybe the
problem is how I read the data in as numpy.genfromtxt
Is there a step I need to take to convert the data to numpy array to then
read into matplotlib?
Thanks
On Fri, Mar 2, 2012 at 11:49 AM, questions anon wrote
os
On Thu, Mar 1, 2012 at 4:42 PM, Benjamin Root wrote:
>
>
> On Wednesday, February 29, 2012, questions anon wrote:
>
>> I have had some progress reading in the data but am unsure how to create
>> lats and lons from the info I have (see above).
>> the error I am
-9.975, 691)
x,y=map(*N.meshgrid(xi,yi))
plt.title('rainfall')
CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet)
l,b,w,h =0.1,0.1,0.8,0.8
cax = plt.axes([l+w+0.025, b, 0.025, h])
plt.colorbar(CS,cax=cax, drawedges=True)
plt.savefig((os.path.join(OutputFolder, 'rainfall.png')))
plt
I have a txt file (with an associated prj file) containing gridded weather
data.
Firstly how can I open this file and convert it to a numpy array?
and then how to plot in matplotlib, paticularly how to use the lat, lon and
nrows,ncols.
ncols=886
nrows=691
longitude west=111.975, east=156.275
latitu
6 Dec 2011 21:23:18 -0600
> From: ben.r...@ou.edu
> To: questions.a...@gmail.com
> CC: Matplotlib-users@lists.sourceforge.net
> Subject: Re: [Matplotlib-users] add cirlce around lat lon
>
>
>
>
> On Tuesday, December 6, 2011, questions anon
> wrote:
> > I would li
I would like to draw a simple circle around a specified latitude and
longitude but I cannot find an appropriate command.
I have tried using
map.drawgreatcircle(myLON, myLAT,myLON, myLAT, linewidth=20,color='k')
but this doesn't do anything
or even
map.drawgreatcircle(myLON+1, myLAT+1,myLON-1, myLAT
thanks, will look at these options.
On Fri, Nov 4, 2011 at 10:21 AM, Matt S. wrote:
> I've used Pyshapelib and Polygon to do this type of analysis in the past.
> Thuban may get ya what you need.
>
> On Thu, Nov 3, 2011 at 3:40 PM, questions anon
> wrote:
>
>>
**
>
> *From:* questions anon [mailto:questions.a...@gmail.com]
> *Sent:* Wednesday, November 02, 2011 17:17
>
> Thanks, I think you are right about the datetimes for the x axis causing
> the problem.
> Does anyone have any ideas how to resolve this?
>
> Does it help to c
Hi All,
Is there a way to select only the values within a particular shapefile to
analyse.
I would like to do something like:
array=numpyarraycoveringtemperatureofwholestate
shapefile=forestedregions.shp
newarray=ma.masked_values(array, shapefile)
meantemperatureofforestedregions=MA.mean(newarray
nd arrays with NaNs and
>> treat both the same. Can you reduce the script to something that can be
>> run independently without data? It's not clear to me yet why this is
>> failing.
>>
>> Mike
>>
>>
>> On 11/01/2011 05:24 PM, questions an
Hi All,
I am trying to plot time against mean daily temperature values. The problem
is temperature contains no data in a few areas. I want to be able to ignore
this and continue plotting.
When I run the below script on my data that has all normal numbers it works
fine but when I run the script on m
Thanks Jeff!
On Thu, Oct 20, 2011 at 1:16 PM, Jeff Whitaker wrote:
> On 10/19/11 4:37 PM, questions anon wrote:
>
> thank you, I am not quite sure how to 'draw' the shapefile
>
> from matplotlib.collections import LineCollection
> ax =
thank you, I am not quite sure how to 'draw' the shapefile but making those
changes and removing the shapefile has sped the processing up considerably!
Thank you for your help
On Wed, Oct 19, 2011 at 11:42 PM, Jeff Whitaker wrote:
> On 10/18/11 8:55 PM, questions anon wrote:
&g
/11 8:20 PM, questions anon wrote:
>
> Hi All,
> I keep receiving a memory error when processing many netcdf files. I
> assumed it had something to do with how I loop things and maybe needed to
> close things off properly but I recently received an error that made me
> think i
for the responses.
On Fri, Oct 14, 2011 at 9:32 AM, Eric Firing wrote:
> On 10/13/2011 12:22 PM, Benjamin Root wrote:
>
>>
>>
>> On Thursday, October 13, 2011, questions anon > <mailto:questions.anon@gmail.**com >> wrote:
>> > Another quick questio
gative to account for
southern hemisphere
v=-1*N.cos(WDIR*N.pi/180)
map.quiver(x,y,u, v)
On Wed, Oct 5, 2011 at 3:20 PM, questions anon wrote:
> thank you! of course!
>
>
> On Wed, Oct 5, 2011 at 3:08 PM, Eric Firing wrote:
>
>> On 10/04/2011 05:40
Hi All,
I keep receiving a memory error when processing many netcdf files. I assumed
it had something to do with how I loop things and maybe needed to close
things off properly but I recently received an error that made me think it
might be because of matplotlib.
In the code below I am looping thr
thank you! of course!
On Wed, Oct 5, 2011 at 3:08 PM, Eric Firing wrote:
> On 10/04/2011 05:40 PM, questions anon wrote:
> > Excellent, thank you. That works for both quiver and barb.
> > In regards to the shape that has to do with the netcdf file, wind
> > direction vari
th is
> 0, South is 180, etc, so that should all be assigned already.
>
> It also looks like you have an array size mis-match, can you print
> LAT.shape, LON.shape,TIME.shape,WDIR.shape it may be that your lat,lon
> variables also need to be subset to [-50]?
>
> hope this helps,
&g
ept for d_0
On Tue, Oct 4, 2011 at 12:54 PM, Eric Firing wrote:
> On 10/03/2011 03:00 PM, Benjamin Root wrote:
> > On Mon, Oct 3, 2011 at 6:51 PM, questions anon > <mailto:questions.a...@gmail.com>> wrote:
> >
> > Hi All,
> > Is there a simple way to pl
Hi All,
Is there a simple way to plot a directional arrow to represent a degree?
I have a netcdf file containing wind direction as degrees and I would like
to make a plot with all little arrows representing the wind direction.
Below is the code I am using currently to plot wind direction but am not
Can anyone explain how I could:
-Open two shapefiles
-Open a raster
-Plot a histogram of the values within each shapefile on the same plot and
display the mean and Standard Deviation of each plot.
Thanks
--
Let Crystal
37 matches
Mail list logo