[Matplotlib-users] Plotting current surface data : Only one arrow appears

2013-07-05 Thread piecess
I want to plot current data on a map. I wrote that :



But it returns me only one arrow According to the using of the shape
function I guess my slice is right :



What can I do to have all the arrows? (It's a global world file..)



--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/Plotting-current-surface-data-Only-one-arrow-appears-tp41405.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Smooth animations

2013-07-05 Thread v0idnull
Yes, but this is where I am failing. I don't have the code with me right 
now but I can explain it:


I get a new number every 2000 milliseconds, and I want to update the 
graph say, every 50 milliseconds, and keep a minute of history visible 
in the graph.


So that's 30 x-axis ticks.

But if I want to draw this out smoothly, I need 40 more ticks per update 
interval. I have five lines I want to show, so every 50ms, 600 points 
need to be plotted out.


Now, my proof of concept code is just working with arrays in a sort of 
FIFO queue, I haven't actually tried to plug those arrays into 
matplotlib, but it seems like replotting 600 points is a lot of work.


Maybe I am over reacting? Or is there some feature of matplotlib that 
allows me to push data onto a plot instead of replotting all points?


I dunno, I'm not confident in my approach. I seek inspiration.

thanks,
--alex

This means that every 50ms, 600 points need to be updated.

On 13-07-04 05:11 PM, Michael Droettboom wrote:
I see -- you want to basically interpolate between points?  I don't 
think there's anything built in to matplotlib to do that, but you 
could always do that interpolation outside and just update the graph 
more often.


Mike

On 07/04/2013 04:28 PM, v0idnull wrote:

eh

Let me explain my problem in a different way:

Every two seconds I get a value from a service. Let's say I over 8 
seconds I get 1, 5, 10, 5 as values.


So if my application updates the graph every two seconds, this will 
look choppy and ugly. This is because every two seconds, an entire 
line is added onto the graph between the two points.


Imagine if I could control the drawing of said line though. If I 
could draw the individual pixels of the line every couple of ticks 
instead of just dumping a line in every two seconds, I will end up 
with a nice smooth animation. It may not be 100% real time anymore, 
but my focus on this personal project of mine is vanity, not 
practicality ;)


I hope this better explains what I am trying to accomplish...

Thanks,
--alex

On 13-07-04 04:09 PM, Michael Droettboom wrote:
Have you looked at the simple_anim.py example -- other than the 
networking piece, it seems to do what you describe, and it's pretty 
fast. Maybe start from that and make changes until it gets slow in 
order to determine where the slowness comes from...?


Mike

On 07/03/2013 09:19 PM, v0idnull wrote:
I am receiving a number from a server every two seconds. I would 
like to plot this number.out over time for the past say... 30 polls.


Would it be possible to use... Anything, to produce a smooth 
animation of the plot line getting drawn? As it stands now the 
animation is well... Quite choppy. ;)


I'm using pygame currently to render my graphs on this full screen 
application I'm making just for my self. I am not bound to it 
though if there are better linux-only things out there.


Thanks in advance,
--alex


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

!DSPAM:51d5d60416102691037314!


___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


!DSPAM:51d5d60416102691037314!




--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


!DSPAM:51d5e4c116101841011479!


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

!DSPAM:51d5e4c116101841011479!


___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


!DSPAM:51d5e4c116101841011479!


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Basemap transform_vector for decreasing latitudes

2013-07-05 Thread Jeff Whitaker
 	   
   	kmanross  
  July 2, 2013 
12:42 PMGreetings!Relative newbie here.I'm
 trying to plot wind vectors using basemap quiver and to fit my orthoprojection.
 This is essentially a hack of Jeff Whitaker's animate.py foundat https://github.com/matplotlib/basemap/blob/master/examples/animate.pyThe
 data source I'm connecting to, however, has the latitudes in decreasingorder,
 so I get the "lats and lons must be in increasing order!" exceptionwhen
 trying to use the transform_vector method which seems to be required tofit
 the vectors to the projection.  (ugliness occurs when failing totransform)What
 would be the best way to transform latitudes (to increasing) as neededby
 transform_vector, while also accounting for the data order of my u and vgrids?-kevin.Kevin: 
 Just flip the data around.lats_flipped = lats[::-1,:]data_flipeed
 = data[::-1,:] # assuming 2d array shape (nlats,nlons)-Jeff--View this 
message in context: 
http://matplotlib.1069221.n5.nabble.com/Basemap-transform-vector-for-decreasing-latitudes-tp41375.htmlSent
 from the matplotlib - users mailing list archive at Nabble.com.--This
 SF.net email is sponsored by Windows:Build for Windows Store.http://p.sf.net/sfu/windows-dev2dev___Matplotlib-users
 mailing [email protected]://lists.sourceforge.net/lists/listinfo/matplotlib-users 
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Plot/save line collection object without margins

2013-07-05 Thread death jun
Hello list,

I have LineCollection object: "l = matplotlib.collections.LineCollection()" 
which I want to save as image without any kind of margins.

What have I tried is following:

ax = plt.subplot(111)
ax.set_axis_off()
ax.add_collection(l)
ax.autoscale_view()
plt.savefig('img.png')

but there are still unwanted margins.

How to plot without margins?


Thanks

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] basemap meridians cut off

2013-07-05 Thread spmls
Hello,

I've been having a problem in my basemap plots of areas with small spatial
extents, where my meridians are cutoff like so:

 

I've tried simplifying the code as much as possible, but still get a similar
problem:

 

The meridians plot correctly when I use a normal mercator  instead of the
transverse mercator projection, so switching to mercator is my last resort
option for now.  Has anyone dealt with this problem before and found a
workaround?

Thank you!
-SeanPaul

Here's my simplified code:

import numpy as np
import matplotlib as mpl
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt


"""Input desired lats (y) and lons(x) of plot"""

xmin = -166.22
xmax = -166.134

ymin = 53.7439
ymax = 53.7827


m = Basemap(projection='tmerc', lon_0=-165. , lat_0=0 , llcrnrlon=xmin,
llcrnrlat=ymin, urcrnrlon=xmax , urcrnrlat=ymax)

meridians = np.arange(xmin,xmax,(30/3600)) # 30 arcsecond spacing
m.drawmeridians(meridians)

parallels = np.arange(ymin,ymax,(30/3600))
m.drawparallels(parallels)

plt.show()



--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/basemap-meridians-cut-off-tp41409.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] basemap meridians cut off

2013-07-05 Thread Jeff Whitaker
 	   
   	spmls  
  July 5, 2013 
10:58 AMHello,I've been having a problem in my
 basemap plots of areas with small spatialextents, where my 
meridians are cutoff like so:
 I've tried simplifying the code as much as possible, but still 
get a similarproblem:
 The meridians plot correctly when I use a normal mercator  
instead of thetransverse mercator projection, so switching to 
mercator is my last resortoption for now.  Has anyone dealt with 
this problem before and found aworkaround?Thank you!-SeanPaulSeanPaul: 
 This looks like a bug in basemap - please file an issue on the github 
page (https://github.com/matplotlib/basemap).-JeffHere's my simplified 
code:import numpy as npimport matplotlib as mplfrom 
mpl_toolkits.basemap import Basemapimport matplotlib.pyplot as plt"""Input
 desired lats (y) and lons(x) of plot"""xmin = 
-166.22xmax = -166.134ymin = 53.7439ymax = 53.7827m
 = Basemap(projection='tmerc', lon_0=-165. , lat_0=0 , llcrnrlon=xmin,llcrnrlat=ymin,
 urcrnrlon=xmax , urcrnrlat=ymax)meridians = 
np.arange(xmin,xmax,(30/3600)) # 30 arcsecond spacingm.drawmeridians(meridians)parallels
 = np.arange(ymin,ymax,(30/3600))m.drawparallels(parallels)plt.show()--View
 this message in context: 
http://matplotlib.1069221.n5.nabble.com/basemap-meridians-cut-off-tp41409.htmlSent
 from the matplotlib - users mailing list archive at Nabble.com.--This
 SF.net email is sponsored by Windows:Build for Windows Store.http://p.sf.net/sfu/windows-dev2dev___Matplotlib-users
 mailing [email protected]://lists.sourceforge.net/lists/listinfo/matplotlib-users 
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users