SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S




1
(27)
2
(15)
3
(2)
4
(4)
5
(5)
6
(9)
7
(15)
8
(24)
9
(19)
10
(7)
11
(13)
12
(26)
13
(27)
14
(17)
15
(14)
16
(12)
17
(9)
18
(12)
19
(17)
20
(19)
21
(5)
22
(5)
23
(7)
24
(4)
25
(1)
26
(9)
27
(20)
28
(5)
29
(10)
30
(12)
31
(6)

Showing 15 results of 15

From: phils <phi...@ho...> - 2012年03月02日 22:06:53
Hello
Found the example below and looks ideal for what I want with 2 exceptions.
I want the x axis to have a time period of say 12 months and y axis no's of
USD values.
So, the data is like..
Jan 2011 100034
Feb2011 345321
Mar 2011 785434
Apr 2011 523753
May 2011 346723
etc etc
the code I found is and as a newbie tried and failed to convert .
Help appreciated
import numpy as npy
from pylab import figure, show
from matplotlib.widgets import SpanSelector
 
fig = figure(figsize=(8,6))
ax = fig.add_subplot(211, axisbg='#FFFFCC')
 
x = npy.arange(0.0, 5.0, 0.01)
y = npy.sin(2*npy.pi*x) + 0.5*npy.random.randn(len(x))
ax.plot(x, y, '-')
ax.set_ylim(-2,2)
ax.set_title('Press left mouse button and drag to test')
ax2 = fig.add_subplot(212, axisbg='#FFFFCC')
line2, = ax2.plot(x, y, '-')
 
def onselect(xmin, xmax):
 indmin, indmax = npy.searchsorted(x, (xmin, xmax))
 indmax = min(len(x)-1, indmax)
 thisx = x[indmin:indmax]
 thisy = y[indmin:indmax]
 line2.set_data(thisx, thisy)
 ax2.set_xlim(thisx[0], thisx[-1])
 ax2.set_ylim(thisy.min(), thisy.max())
 fig.canvas.draw() 
# set useblit True on gtkagg for enhanced performance
span = SpanSelector(ax, onselect, 'horizontal', useblit=True,
 rectprops=dict(alpha=0.5, facecolor='red') )
show()
 
-- 
View this message in context: http://old.nabble.com/Converting-example-from-Gallery-to-suite-X-Y-axis-tp33431805p33431805.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jean-Baptiste M. <mar...@ia...> - 2012年03月02日 16:03:43
Aloha Eric,
> This appears to be very much a dueling event loop problem. My guess is 
> that the solution will have to be something that keeps the event loops 
> well separated, probably in separate processes. All interaction with 
> your Client event loop would be in one process, and the callback would 
> get your data and put it somewhere (e.g. in a numpy npz file). Then the 
> trick is to have the matplotlib process in a polling loop using a timer 
> (done crudely with plt.pause(0.1); there is probably a better way) 
> checking to see if that "somewhere" has been updated, and if so, 
> updating its plot.
I feel I see the light at the end of the tunnel. The npz file is even not necessary, I just need to pass the star id to a separate plotting process, to be compared to some stored previous value, in order to refresh the plot.
I have to think about it for a couple of days...
Thanks for the suggestion,
Cheers,
JB
On 03/02/2012 01:16 AM, Jean-Baptiste Marquette wrote:
>
> Hi Ben,
>
>> You have several possible sources of problems here. I would first make
>> sure that basic matplotlib scripts work using the Qt4Agg backend on
>> your computer. Test out some regular scripts from the examples section
>> of the documentation. If they work as expected, then it is probably
>> more likely that there is a problem with one of the other libraries.
>
> Good point. Tests successful.
>
>> Another possible source of trouble may lie with the calls to "sleep".
>> Because the display libraries are not on a separate process, the sleep
>> could also prevent the figures from being completely rendered.
>>
>> Personally, I wouldn't even bother with the interactive mode. Keep it
>> off, and just put the cleanup code after "plt.show()", which is a
>> blocking call. There is no need to implement your own event loop.
>
> The challenge is to display hundreds of stellar light curves by
> sequently selecting rows in a table through the SAMP mechanism. Thus it
> would be fine not to have to kill the plot window after each display,
> but to have it automatically refreshed after each row selection (I'm a
> lazy guy...).
> I just commented the plt.ion() line, this yields a segmentation fault,
> here is the crash report.
This appears to be very much a dueling event loop problem. My guess is 
that the solution will have to be something that keeps the event loops 
well separated, probably in separate processes. All interaction with 
your Client event loop would be in one process, and the callback would 
get your data and put it somewhere (e.g. in a numpy npz file). Then the 
trick is to have the matplotlib process in a polling loop using a timer 
(done crudely with plt.pause(0.1); there is probably a better way) 
checking to see if that "somewhere" has been updated, and if so, 
updating its plot.
Eric
>
> Cheers
> JB
>
From: John H. <jd...@gm...> - 2012年03月02日 14:55:44
On Fri, Mar 2, 2012 at 4:57 AM, Guillaume Gay <gui...@mi...
> wrote:
> Hi list,
>
> I am trying to implement some GUI tools in matplotlib - more precisely a
> line profile tool and a contrast setter which I hope will be integrated to
> the skimage kit [see https://github.com/glyg/**scikits-image/blob/master/*
> *skimage/io/_plugins/**matplotlib_plugin.py<https://github.com/glyg/scikits-image/blob/master/skimage/io/_plugins/matplotlib_plugin.py>].
>
>
> Now here is my question:
> Is it possible to grab the content of a figure and 'displace' it in a
> subplot of the same figure, to give room for a knew plot - even if the
> original content is complex (i.e. an image + a colorbar + an histogram, for
> example).
>
> I am not sure I'm clear here, so I can try to rephrase if needed.
>
>
I am not sure if you are trying to move objects from one axes to another or
merely reposition an existing axes to make room for a new one.
Both are possible, but the latter is easy. Each axes has [left, bottom,
width, height] rectangle in (0,1) figure coordinates that you can adjust at
any time. See for example the subplots_adjust tool on the navigation
toolbar next to the save icon
http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_position
If you are working with subplots, also see the change_geometry method
http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.SubplotBase.change_geometry
colorbars are a little tricky, because there you are needing to reposition
*two* axes, one for the image, and one for the colorbar itself. You can do
this manually, but you probably want to look at JJ's gridspec and axes_grid
tools for laying out groups of axes:
http://matplotlib.sourceforge.net/users/gridspec.html
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/index.html#toolkit-axesgrid-index
JDH
From: EnderWiggin <jan...@go...> - 2012年03月02日 13:49:56
Hi Jeff,
thank you for your answer. It was very helpful to me.
Have a nice weekend!
-Jan
-- 
View this message in context: http://old.nabble.com/Setting-the-bin-content-of-a-histogram-tp33412466p33428602.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Antoine S. <an...@mo...> - 2012年03月02日 11:20:17
Hi,
you should be able to do so. In the past, I had written a small GUI that
had the ability to copy Line2D, images and text elements from an axe to
any other axes (even on different figure). This was integrated into GUI
used to change the line properties. It is a bit old and dirty but you
can find it there:
http://mpl-properties.googlecode.com/svn/trunk/mpl_properties.py
look for the "do_copy" function.
Antoine
On Fri, 2012年03月02日 at 11:57 +0100, Guillaume Gay wrote:
> Hi list,
> 
> I am trying to implement some GUI tools in matplotlib - more precisely a 
> line profile tool and a contrast setter which I hope will be integrated 
> to the skimage kit [see 
> https://github.com/glyg/scikits-image/blob/master/skimage/io/_plugins/matplotlib_plugin.py]. 
> 
> 
> Now here is my question:
> Is it possible to grab the content of a figure and 'displace' it in a 
> subplot of the same figure, to give room for a knew plot - even if the 
> original content is complex (i.e. an image + a colorbar + an histogram, 
> for example).
> 
> I am not sure I'm clear here, so I can try to rephrase if needed.
> 
> Thanks
> 
> Guillaume
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing 
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jean-Baptiste M. <mar...@ia...> - 2012年03月02日 11:16:17
Hi Ben,
> You have several possible sources of problems here. I would first make sure that basic matplotlib scripts work using the Qt4Agg backend on your computer. Test out some regular scripts from the examples section of the documentation. If they work as expected, then it is probably more likely that there is a problem with one of the other libraries. 
Good point. Tests successful.
> Another possible source of trouble may lie with the calls to "sleep". Because the display libraries are not on a separate process, the sleep could also prevent the figures from being completely rendered.
> 
> Personally, I wouldn't even bother with the interactive mode. Keep it off, and just put the cleanup code after "plt.show()", which is a blocking call. There is no need to implement your own event loop.
The challenge is to display hundreds of stellar light curves by sequently selecting rows in a table through the SAMP mechanism. Thus it would be fine not to have to kill the plot window after each display, but to have it automatically refreshed after each row selection (I'm a lazy guy...).
I just commented the plt.ion() line, this yields a segmentation fault, here is the crash report.
Cheers
JB
From: Guillaume G. <gui...@mi...> - 2012年03月02日 11:05:31
Attachments: guillaume.vcf
Hi list,
I am trying to implement some GUI tools in matplotlib - more precisely a 
line profile tool and a contrast setter which I hope will be integrated 
to the skimage kit [see 
https://github.com/glyg/scikits-image/blob/master/skimage/io/_plugins/matplotlib_plugin.py]. 
Now here is my question:
Is it possible to grab the content of a figure and 'displace' it in a 
subplot of the same figure, to give room for a knew plot - even if the 
original content is complex (i.e. an image + a colorbar + an histogram, 
for example).
I am not sure I'm clear here, so I can try to rephrase if needed.
Thanks
Guillaume
From: Paul H. <pmh...@gm...> - 2012年03月02日 02:45:19
Whoops, make that:
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.lines as lines
import numpy as np
m = Basemap(llcrnrlon=-11.5,llcrnrlat=51.0,urcrnrlon=-4.5,urcrnrlat=56.0,
 resolution='i',projection='cass',lon_0=-4.36,lat_0=54.7)
lats = [53.5519317,53.8758499, 54.2894659, 55.2333142,
54.9846137,54.7064869, 51.5296651, 51.5536226, 51.7653115, 52.1625237,
52.5809163, 52.9393892]
lons = [-9.9413447, -9.9621948, -8.9583439, -7.6770179, -8.3771698,
-8.7406732, -8.9529546, -9.7907148, -10.1531573, -10.4099873,
-9.8456417, -9.4344939]
x, y = m(lons, lats) # forgot this line
m.plot(x, y, 'D-', markersize=10, linewidth=2, color='k', markerfacecolor='b')
m.drawcoastlines()
plt.show()
On Thu, Mar 1, 2012 at 6:43 PM, Paul Hobson <pmh...@gm...> wrote:
> David,
>
> The loop is you have is unnecessary. You can plot the markers and the
> lines at the same time like so:
> from mpl_toolkits.basemap import Basemap
> import matplotlib.pyplot as plt
> import matplotlib.lines as lines
> import numpy as np
>
> m = Basemap(llcrnrlon=-11.5,llcrnrlat=51.0,urcrnrlon=-4.5,urcrnrlat=56.0,
>      resolution='i',projection='cass',lon_0=-4.36,lat_0=54.7)
>
> lats = [53.5519317,53.8758499, 54.2894659, 55.2333142,
> 54.9846137,54.7064869, 51.5296651, 51.5536226, 51.7653115, 52.1625237,
> 52.5809163, 52.9393892]
>
> lons = [-9.9413447, -9.9621948, -8.9583439, -7.6770179, -8.3771698,
> -8.7406732, -8.9529546, -9.7907148, -10.1531573, -10.4099873,
> -9.8456417, -9.4344939]
>
> m.plot(x, y, 'D-', markersize=10, linewidth=2, color='k', markerfacecolor='b')
> m.drawcoastlines()
> plt.show()
>
> Hope that helps,
> -paul
>
> On Wed, Feb 29, 2012 at 4:27 AM, David Craig <dcd...@gm...> wrote:
>> Hi,
>> I'm trying to produce a map with 12 locations marked on it and straight
>> lines plotted between each point and all other points on the map. I have
>> the map with the locations ok but am having trouble getting the lines.
>> My code is below anyone know how to do this??
>> Thanks
>> D
>>
>> from mpl_toolkits.basemap import Basemap
>> import matplotlib.pyplot as plt
>> import matplotlib.lines as lines
>> import numpy as np
>>
>> m = Basemap(llcrnrlon=-11.5,llcrnrlat=51.0,urcrnrlon=-4.5,urcrnrlat=56.0,
>>       resolution='i',projection='cass',lon_0=-4.36,lat_0=54.7)
>>
>> lats = [53.5519317,53.8758499, 54.2894659, 55.2333142,
>> 54.9846137,54.7064869, 51.5296651, 51.5536226, 51.7653115, 52.1625237,
>> 52.5809163, 52.9393892]
>>
>> lons = [-9.9413447, -9.9621948, -8.9583439, -7.6770179, -8.3771698,
>> -8.7406732, -8.9529546, -9.7907148, -10.1531573, -10.4099873,
>> -9.8456417, -9.4344939]
>>
>> x, y = m(lons, lats)
>> for i in range(len(lons)):
>>   for j in range(len(lons)):
>>     if i == j: continue
>>     m.plot([x[i],y[i]],[x[j],y[j]],'k')
>>
>> m.plot(x, y, 'bD', markersize=10)
>> m.drawcoastlines()
>> #m.drawmapboundary()
>> #plt.savefig('/media/A677-86E0/dot_size'+str(i)+'.png')
>> plt.show()
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Paul H. <pmh...@gm...> - 2012年03月02日 02:44:06
David,
The loop is you have is unnecessary. You can plot the markers and the
lines at the same time like so:
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.lines as lines
import numpy as np
m = Basemap(llcrnrlon=-11.5,llcrnrlat=51.0,urcrnrlon=-4.5,urcrnrlat=56.0,
 resolution='i',projection='cass',lon_0=-4.36,lat_0=54.7)
lats = [53.5519317,53.8758499, 54.2894659, 55.2333142,
54.9846137,54.7064869, 51.5296651, 51.5536226, 51.7653115, 52.1625237,
52.5809163, 52.9393892]
lons = [-9.9413447, -9.9621948, -8.9583439, -7.6770179, -8.3771698,
-8.7406732, -8.9529546, -9.7907148, -10.1531573, -10.4099873,
-9.8456417, -9.4344939]
m.plot(x, y, 'D-', markersize=10, linewidth=2, color='k', markerfacecolor='b')
m.drawcoastlines()
plt.show()
Hope that helps,
-paul
On Wed, Feb 29, 2012 at 4:27 AM, David Craig <dcd...@gm...> wrote:
> Hi,
> I'm trying to produce a map with 12 locations marked on it and straight
> lines plotted between each point and all other points on the map. I have
> the map with the locations ok but am having trouble getting the lines.
> My code is below anyone know how to do this??
> Thanks
> D
>
> from mpl_toolkits.basemap import Basemap
> import matplotlib.pyplot as plt
> import matplotlib.lines as lines
> import numpy as np
>
> m = Basemap(llcrnrlon=-11.5,llcrnrlat=51.0,urcrnrlon=-4.5,urcrnrlat=56.0,
>       resolution='i',projection='cass',lon_0=-4.36,lat_0=54.7)
>
> lats = [53.5519317,53.8758499, 54.2894659, 55.2333142,
> 54.9846137,54.7064869, 51.5296651, 51.5536226, 51.7653115, 52.1625237,
> 52.5809163, 52.9393892]
>
> lons = [-9.9413447, -9.9621948, -8.9583439, -7.6770179, -8.3771698,
> -8.7406732, -8.9529546, -9.7907148, -10.1531573, -10.4099873,
> -9.8456417, -9.4344939]
>
> x, y = m(lons, lats)
> for i in range(len(lons)):
>   for j in range(len(lons)):
>     if i == j: continue
>     m.plot([x[i],y[i]],[x[j],y[j]],'k')
>
> m.plot(x, y, 'bD', markersize=10)
> m.drawcoastlines()
> #m.drawmapboundary()
> #plt.savefig('/media/A677-86E0/dot_size'+str(i)+'.png')
> plt.show()
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Matt N. <new...@ca...> - 2012年03月02日 02:21:30
Dear Andrea, All
On 1 March 2012 22:31, Andrea Gavana <and...@gm...> wrote:
> I thought the OP's original question was something like the Matlab
> "plot editor" (or whatever is its name), which allows you to edit line
> colours, styles, gridlines styles, this kind of stuff on a "live" plot
> (mind you, it's been 6 years since I used Matlab for the last time and
> I may have forgotten what the "plot editor" does).
>
> Anyway, if I am not completely off-track, this is something I had been
> looking for as well in matplotlib a while back (3, 4 years ago), but
> at that time I was told it would have been complicated to implement it
> for all the "live" backend (I can't recall the exact reason).
>
> I would say that, at least for the backends based on wxPython, this
> kind of modify-the-live-plot-via-GUI-interaction should be relatively
> straightforward, at least for the GUI part and for the basics (line
> styles, colours, markers and so on). However I am not sure what are
> the implications on the core matplotlib code.
>
> But if I have misunderstood, I apologize for the noise :-) .
For the wx backend to matplotlib, wxmplot
(http://github.com/newville/wxmplot,
http://newville.github.com/wxmplot/) does provide some of the basic
editing features for simple 2d line plots such as changing colour,
style, markers, text labels and so on via a GUI form, much as you
describe. For image displays, it allows changing the colour table,
smoothing, and rotating and so on.
It is definitely not as complete as all of matplotlib, and I'm sure it
could be improved. Still, it can serve many simple plotting needs
where one wants to give the end-user the ability to customize the
plots, and wx/matplotlib developers needing might find it useful.
--Matt Newville
From: Mic <mic...@gm...> - 2012年03月02日 01:32:42
+1
On Fri, Mar 2, 2012 at 10:46 AM, Fernando Perez <fpe...@gm...>wrote:
> On Thu, Mar 1, 2012 at 4:16 PM, Mic <mic...@gm...> wrote:
> > Would be greate if it would be possible to record talks and slides and
> make
> > them public for whome are not leaving near by.
>
> The hack night will be 'open space' so not videotaped, but the main
> workshop will be, thanks to the awesome folks at Marakana who pitched
> in to do the hard work.
>
> We'll provide links to the videos once they get uploaded.
>
> Cheers,
>
> f
>
From: questions a. <que...@gm...> - 2012年03月02日 00:49:43
python, numpy through enthought -
Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul 3 2011, 15:13:59) [MSC
v.1500 32 bit (Intel)] on win32
imports at the top of the script:
import numpy as N
import matplotlib.pyplot as plt
from numpy import ma as MA
from mpl_toolkits.basemap import Basemap
import os
On Thu, Mar 1, 2012 at 4:42 PM, Benjamin Root <ben...@ou...> 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 receiving is:
>>
>> Traceback (most recent call last):
>> File "d:\plotrainfall.py", line 40, in <module>
>> CS = map.contourf(x,y, f, 15,cmap=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
>>
>>
>> from the below code:
>>
>>
>> onefile=r"E:/test_in/r19000117.txt"
>>
>> f=N.genfromtxt(onefile, skip_header=6, dtype=float, names=True)
>> print f
>>
>>
>> map = Basemap(projection='merc',llcrnrlat=-45,urcrnrlat=-9,
>> llcrnrlon=111.975,urcrnrlon=156.525,lat_ts=0,resolution='i')
>> map.drawcoastlines()
>> map.drawstates()
>> xi=N.linspace(111.975, 156.275, 886)
>> yi=N.linspace(-44.525, -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.show()
>> plt.close()
>>
>>
>>
> How did you install numpy? Which version are you using? What are your
> imports at the top of this script?
>
> Ben Root
>
From: Fernando P. <fpe...@gm...> - 2012年03月02日 00:47:22
On Thu, Mar 1, 2012 at 4:16 PM, Mic <mic...@gm...> wrote:
> Would be greate if it would be possible to record talks and slides and make
> them public for whome are not leaving near by.
The hack night will be 'open space' so not videotaped, but the main
workshop will be, thanks to the awesome folks at Marakana who pitched
in to do the hard work.
We'll provide links to the videos once they get uploaded.
Cheers,
f
From: Mic <mic...@gm...> - 2012年03月02日 00:16:14
Would be greate if it would be possible to record talks and slides and make
them public for whome are not leaving near by.
Thank you in advance.
On Fri, Mar 2, 2012 at 12:06 AM, John Hunter <jd...@gm...> wrote:
> I'll be attending the pydata hack night in Santa Clara tomorrow night.
> We'll be hacking on matplotlib, ipython, pandas, numpy and more. If you
> are interested in stopping by, there is space for 200, many more than the
> number of attendees at pydata. The event info is here:
>
> http://python-data-hack-night.eventbrite.com/
>
> Here is the description from the event:
>
> The Python Data Workshop just got bigger! We are thrilled to announce
> that Ground Floor Silicon Valley is generously opening up their coworking
> space and hosting a Friday night Python Data Hack Night for all attendees
> of the Workshop and any others who want to geek out on Python, data
> analysis, and scientific computing! Spend a fun evening eating, drinking,
> coding, and talking shop with the instructors and participants of the
> Workshop. This includes the authors of Numpy, Scipy, IPython, Matplotlib,
> PyTables, Pandas, and many other great Python packages.
>
> Ground Floor has room for up to 200 folks, so if you are on the wait list
> for the full Workshop, this is your chance to participate in the workshop!
> We are making tickets available to all those who registered for the Python
> Data Workshop (attendees and wait list), before publicizing the event more
> widely, so sign up now!
>
> The event runs from 6pm until Midnight.
> We are looking for sponsors to cover food and drinks, but we do expect to
> have those there.
> For sponsorship details, contact lyn...@ge...
>
> Ground Floor SV
> 2030 Duane Avenue
> Santa Clara, CA 95054
>
> Friday, March 2, 2012 from 6:00 PM to 11:55 PM (PT)
>
>
> JDH
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

Showing 15 results of 15

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /