[Matplotlib-users] matplotlib basemap streamlines plot
Hi all, tried to plot a streamline with matplotlib. So far it work's. But my question: Is there a possibility to avoid the gaps in the streamlines (see my picture)? http://matplotlib.1069221.n5.nabble.com/file/n45276/ff850_0.png Regards Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/matplotlib-basemap-streamlines-plot-tp45276.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] contourf map with values
Hallo, i have an important question. Is it possible with matplotlib function contourf() to plot the values of the contour-data? Here is an example, what i mean: http://matplotlib.1069221.n5.nabble.com/file/n45025/Untitled.png (i use matplotlib with Basemap) Regards, Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/contourf-map-with-values-tp45025.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting maps with matplotlib-basemap very slow
Hi Ben, i run the process as user root on a virtual linux server. Is this a problem? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-maps-with-matplotlib-basemap-very-slow-tp44755p44759.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting maps with matplotlib-basemap very slow
Hi, creating a pickle of the Basmap instance was the correct way. Now it works great! Thank's all for that quick and helpful support! Solution as follows: m = Basemap (...) pickle.dump(m,open('map.pickle','wb'),-1) # pickle it for ... :# loop to generate x plots pickle.load(open('map.pickle','rb')) # load here the above pickle # do some other stuff Regards Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-maps-with-matplotlib-basemap-very-slow-tp44755p44761.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plotting maps with matplotlib-basemap very slow
I would like to draw very, very simple maps of only europe in matplotlib / basemap, which takes very much time (around 10 seconds!). This is just unreal!? Setting of resolution is only l (low). I need to plot hundreds of those maps every few hours. This would be impossible!!? :( Here is the very simple code: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap m = Basemap(projection='stere',lon_0=5,lat_0=90.0,rsphere=6371200.,\ llcrnrlon=-25.0,urcrnrlon=72.0,llcrnrlat=26.0,urcrnrlat=65.0,resolution='l') m.drawcoastlines(linewidth=0.2) m.drawcountries(linewidth=0.2) plt.savefig('/var/www/map.png') Hope you can help! :( Regards -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-maps-with-matplotlib-basemap-very-slow-tp44755.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting maps with matplotlib-basemap very slow
Hi, yes that helps a lot, reading in the boundaries from a shapefile. But does anybody know, how avoid the double inner borders? Coastlines seem to have a thinner border. Borders between two countries be drawn twice. http://matplotlib.1069221.n5.nabble.com/file/n44757/map.png Regards -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-maps-with-matplotlib-basemap-very-slow-tp44755p44757.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Pyplot contour plot - clabel padding
Jody, perfect - that work's fine. Regards, Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Pyplot-contour-plot-clabel-padding-tp44554p44591.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Pyplot contour plot - clabel padding
Hi @all, the problem seems to be solved. Thanks Jody! What i have done: 1.) check out the xlim and ylim after clabel call *xmin, xmax = plt.xlim() # return the current xlim ymin, ymax = plt.ylim() # return the current ylim print xmin,xmax print ymin,ymax* 2.) use and set these limits before clabel call: *plt.xlim(0.0,6475051.47849) plt.ylim(0.0,4412688.31468)* Yes, that's it. Very confusing! I do not understand why that only goes so awkward? Thanks so much! Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Pyplot-contour-plot-clabel-padding-tp44554p44582.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Pyplot contour plot - clabel padding
Hi Jody, what exactly du you mean - the plot windows size? I tried this: fig = plt.figure(figsize=(8.4,5.76)) But still the same problem. Regards -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Pyplot-contour-plot-clabel-padding-tp44554p44557.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Pyplot contour plot - clabel padding
Hi Jody, i have posted the code. Here again: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap import pygrib filename = file.grib2 grbs = pygrib.open('/data/' + filename) grb= grbs[2] data = grb.values datac = data*0.01 lats, lons = grb.latlons() fig = plt.figure() m = Basemap(projection='stere',lon_0=5,lat_0=90.0,\ llcrnrlon=-25.0,urcrnrlon=60.0,llcrnrlat=30.0,urcrnrlat=60.0,resolution='l') x, y = m(lons, lats) levs = range(940,1065,5) S1=plt.contour(x,y,datac,levs,linewidths=0.5,colors='b') plt.clabel(S1,inline=1,inline_spacing=0,fontsize=8,fmt='%1.0f',colors='b') m.drawmapboundary(fill_color='w') m.drawcoastlines(linewidth=0.2) plt.savefig('test.png', bbox_inches='tight',pad_inches=0.05, dpi=100) Regards, Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Pyplot-contour-plot-clabel-padding-tp44554p44561.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Patch + facecolors
Hi diedro, try something like this: import matplotlib.patches as patches import matplotlib.pyplot as plt fig= plt.figure() ax= fig.add_subplot(111) verts = [0.2,0.8], [0.1,0.5], [0.7,0.1] poly = patches.Polygon(verts, ec='r', fc='g') ax.add_patch(poly) plt.show() http://matplotlib.1069221.n5.nabble.com/file/n44560/help3.png or this: import numpy as np import matplotlib matplotlib.use('Agg') from matplotlib.patches import Polygon from matplotlib.collections import PatchCollection import matplotlib.pyplot as plt fig, ax = plt.subplots() patches = [] x = np.random.rand(3) y = np.random.rand(3) for i in range(3): polygon = Polygon(np.random.rand(3,2), True) patches.append(polygon) colors = 100*np.random.rand(len(patches)) p = PatchCollection(patches, cmap=matplotlib.cm.jet, alpha=0.4) p.set_array(np.array(colors)) ax.add_collection(p) plt.colorbar(p) plt.grid() plt.savefig('/var/www/img/help2.png', bbox_inches='tight',pad_inches=0.05) http://matplotlib.1069221.n5.nabble.com/file/n44560/help2.png Regards, Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Patch-facecolors-tp44558p44560.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Pyplot contour plot - clabel padding
I have trouble with matplotlib / pyplot / basemap. I plot contour lines (air pressure) on a map. I use clabel to show the value of the contour lines. But the problem: the padding between the value and the contour line is too much. I have found the parameter inline_spacing, which i have set to zero. But there is still to much free space. Any ideas? http://matplotlib.1069221.n5.nabble.com/file/n44554/mslp.png My code is as follows: Thanks a lot. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Pyplot-contour-plot-clabel-padding-tp44554.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plotting with a custom color-vector
Hello, I've created a map with matplotlib-Basemap and will have an animated gif by drawing my special points / markers one by one in the plot. That work's fine. Now the markers should have a special color from a generated color-vector. In this vector are values from (0.0-1.0) for grey values. The data-vector is as follows: index 0,1 the lat and lon information, index 2 the gray values. /Problem/: Passing the color vector to the plot command, cause this error: *raise ValueError('third arg must be a format string')* This is the important part of my code: Any ideas? Regards John -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-with-a-custom-color-vector-tp43429.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Orientation of contour-values
Hello, i've made a (filled) contour plot with matplotlib-pyplot. First i use contour() and after that contourf(). My question: the contour-values on the lines have all different orientations. Is it possible to align alle values horizontal (linke normal text)? Thanks, Sappy85 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Orientation-of-contour-values-tp42829.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users