Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread A Short
Thanks Paul i added m.imshow(data, origin='lower', interpolation='none') Its made a little improvement but something still seems to be not right -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Plott

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
Looks like it's just a coarse resolution to me. Try showing the data as an image with no iterpolation. On Thu, Jan 9, 2014 at 3:26 PM, A Short wrote: > Ive also changed the grib file from multi_2.glo_30m.t06z.grib2 to > nww3.t12z.grib.grib2 i still cant figure out which is the right file for >

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread A Short
Ive also changed the grib file from multi_2.glo_30m.t06z.grib2 to nww3.t12z.grib.grib2 i still cant figure out which is the right file for the North East Atlantic neither...i wonder if my data source is wrong..? -- View this

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
How does it look if you remove the calls to `m.drawcoastlines()` and ` m.fillcontinents()`? On Thu, Jan 9, 2014 at 1:05 PM, A Short wrote: > Thats strange they look different on this browser. Hopefully the one below > youll see what i mean > > Thanks > >

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread A Short
Thats strange they look different on this browser. Hopefully the one below youll see what i mean Thanks -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-NOAA-grib2-data-in-basemap-tp42698p4270

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
here > <ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/wave/prod/wave.20140109/> > im > not sure its the right file to get wave heights of the North East Atlantic > so im trying different ones. > > as you can see above in the top image there is some data missing (white > boxes) near t

Re: [Matplotlib-users] pyplot.plot plotting points in wrong order making loops in the graph display

2014-01-09 Thread Eric Firing
On 2014/01/09 1:57 AM, vargfran wrote: > Dear all > pyplot seems to be plottting(joining points with lines) in the wrong order I > have checked all the algorithms relating the data being plotted and > everything is in order >

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread A Short
ok the file im using is this multi_2.glo_30m.t06z.grib2 from here <ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/wave/prod/wave.20140109/> im not sure its the right file to get wave heights of the North East Atlantic so im trying different ones. as you can see above in the top image th

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
I think you posted the same image in both cases. Without seeing the problematic image, I can only guess that it's caused by the resolution of your data. On Thu, Jan 9, 2014 at 7:58 AM, A Short wrote: > Hi Paul, > > Thanks for your reply, I managed to fix it after I realised the mistake I > was

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-09 Thread Skip Montanaro
> > On that assumption, I tried changing the legend to be associated with the > right Y axis: > > if a legend is requested: > labels = [line.get_label() for line in lines] > if I have right axis data to plot: > right_plot.legend(lines, labels).draggable(True) > else: > l

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-09 Thread Skip Montanaro
>> I believe (as of v1.3.1) that after you create the legend you call >> leg.draggable(True) >> http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend.draggable > > Outstanding! (Google was not my friend here. I wasn't searching for > "draggable.") It works if I only plot using the lef

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread A Short
Hi Paul, Thanks for your reply, I managed to fix it after I realised the mistake I was making. I've currently got a new problem. If you look at the image below, there's a lot of white showing up around the coasts which ideally I'd like to remove. The map is drawn using basemap, is there a functio

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
As the error message says, the problem is on Line 14: print f.variables['WWSWHGT_P0_L1_GLL0'] a KeyError means that you tried to access an element that is not in a dictionary. In this case "f.variables" is the dictionary and "' WWSWHGT_P0_L1_GLL0'" is the element. Did your data and script come o

Re: [Matplotlib-users] pyplot.plot plotting points in wrong order making loops in the graph display

2014-01-09 Thread Guillermo-Nicolas Guénon Díaz
Hello, Can you provide a short piece of code that shows the issue? Do you provide your points in order and in a collection-like object that preserves the order in which the points are appended? (a Dict or Set would not preserve the ordering). Regards 2014/1/9 Francisco Vargas > Dear all > py

[Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Rolling Six
Hi im new to Python and basemap i am trying to follow the script below that was posted in another thread here but im getting this error alec@alec-imedia-S2870:~$ python Desktop/test.py /usr/lib/pymodules/python2.7/mpl_too

[Matplotlib-users] pyplot.plot plotting points in wrong order making loops in the graph display

2014-01-09 Thread vargfran
Dear all pyplot seems to be plottting(joining points with lines) in the wrong order I have checked all the algorithms relating the data being plotted and everything is in order this can be observed in the image on how it mak