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
(5) |
2
(17) |
3
(13) |
4
(17) |
5
(26) |
6
(13) |
7
(9) |
|
8
(8) |
9
(13) |
10
(25) |
11
(19) |
12
(24) |
13
(12) |
14
|
|
15
|
16
(5) |
17
(10) |
18
(7) |
19
|
20
(7) |
21
(2) |
|
22
(3) |
23
(11) |
24
(19) |
25
(17) |
26
(6) |
27
(10) |
28
(2) |
|
29
(4) |
30
(15) |
|
|
|
|
|
|
From: Tim H. <hi...@re...> - 2007-04-03 18:29:39
|
I've had similar problems running wxPython code under certain IDEs where things can go very poorly (dramatic crashing, or it just wont execute). At least with the wx or wxagg backends, I have no trouble running matplotlib demos such as "ellipse_demo.py" from inside eclipse+pydev. -tim Gary Ruben wrote: > I have to agree with Giorgio in general. Unfortunately, the threading > support required by matplotlib isn't implemented in pyScripter, which > means that it's a nice environment until you want to do some plotting, > when it becomes a bit flaky. I haven't checked eclipse's behaviour with > matplotlib. > > Gary R. > > Giorgio F. Gilestro wrote: > >> A really great IDE for windows users is pyScripter ( >> http://mmm-experts.com/Products.aspx?ProductId=4 ) >> It's probably the best I could try so far (and it's free). >> >> cheers >> >> On 3/30/07, Tim Hirzel <hi...@re...> wrote: >> >>> As for a good IDE. I really like eclipse with pydev. For easy >>> student/beginner setup, easyclipse has a nice python eclipse distribution >>> >>> http://www.easyeclipse.org/site/distributions/index.html >>> >>> I think I've tried near every python IDE setup out there over the last >>> couple years, and this one wins for me. >>> >>> tim >>> > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > |
|
From: Eric F. <ef...@ha...> - 2007-04-03 18:21:20
|
Eric, Not much progress, I think. Memory leaks seem endemic to the gui backends, although Tk is by far the worst. I have been trying to understand the gtk case in the hope of discovering some simple change in mpl code that might eliminate the problem there and turn out to be applicable to the other backends as well. But I have not found the source of the problem, and it seems to occur even in a very simple test gui script using pure pygtk, with no mpl. I need to do more testing to find out whether the gtk problem is specific to use of gtk.Toolbar, or whether it will occur with any nested widgets. It seems that widgets are not getting destroyed completely; maybe there are some references lurking somewhere in the dark. With gtk, the garbage collector does not find any cycles that it can't deal with, but if I remember correctly from earlier testing, this is not the case with Tk. As a partial workaround, if you don't need the toolbar, try setting rcParams['toolbar'] = None This may make the leak much smaller. I think the toolbar causes problems in all guis simply because it increases the complexity and number of widgets being tracked, if for no other reason. I would be delighted if a gui guru would emerge with a thorough explanation and solution for the memory leaks occurring with repeated opening and closing of windows. Eric Pellegrini Eric wrote: > Hi evebrybody, > > I started a discussion one week ago about a problem of memory leak using > the following code: > > ******************************************************************************** > from Tkinter import * > from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg > import pylab > > def display(): > mat = pylab.zeros((100,100)) > pylab.ioff() > image = pylab.matshow(mat) > pylab.ion() > pylab.close() > can = FigureCanvasTkAgg(image, master=frame) > can.show() > can.get_tk_widget().grid(row = 0,column = 0) > > root = Tk() > frame = Frame(root) > frame.grid(row = 0,column = 0) > canvas = Canvas(frame, width = 240, height = 240, relief = "sunken", bg > = "white") > canvas.grid() > button = Button(root,text="DisplayMatrix",command = display) > button.grid(row = 1,column = 0) > ******************************************************************************* > > up to now, I have not found any way to solve it and unfortunately the > proposed hints did not solve the problem (gc_collect(), clf(), cla()). > Is there something new about this ? > > thanks > > Eric > > ------------------------------------------------------------------------ > Découvrez une nouvelle façon d'obtenir des réponses à toutes vos > questions ! Profitez des connaissances, des opinions et des expériences > des internautes sur Yahoo! Questions/Réponses > <http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com>. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Christopher B. <Chr...@no...> - 2007-04-03 16:16:45
|
First, Please don't cross-post quite so much. I've only sent this to the matplotlib list. Maybe the scipy-users would be better, but I'm not on that one. First: What you want to do really is hard. One of the reasons is that each app is going to have its own "simple" needs. Also, GUIS really do take a lot of work. I've written simple command line scripts, then found wrapping a GUI around them takes three times as long to write as the scripts took in the first place. Yes, it could be easier, but it's always going to be a lot of work. Second: Matlab is an expensive, proprietary application, thus, if you don't build a stand-alone, your users need to buy Matlab to use your code. Python/scipy/numpy/mpl are all freely re-distributable, so you don't' have that problem. Maybe your users don't really need a stand-alone, but rather need an easy to install and use environment for running your code, command line and all. Granted, there is no such complete package available at this point but there are efforts to make then, and you could also build your own. The Enthought build is good for Windows. Also be sure to check out qme-dev: http://sourceforge.net/projects/qme-dev/ It's not complete yet, but looks pretty promising. There are also efforts afoot to make it a bit easier to use py2exe, py2app, etc. for building stand-alones. If you really do want to build a stand-alone GUI tool, there are a lot of ways to make really full-featured GUIs, though you're right, it takes quite a bit of work. Given the state of affairs right now, I'd take a look at Dabo (it's not just for database apps): http://dabodev.com/ or PythonCard http://pythoncard.sourceforge.net/ And figure out how to integrate MPL with them (probably with wxMPL). Both of these projects seek to make it easier to build GUIs with wxPython, which I think is the best choice for cross-platform GUIs. Dabo, in particular, is oriented toward data-aware widgets, which could be a very good match for small scientific computation tools. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Ken M. <mc...@ii...> - 2007-04-03 15:51:42
|
On Apr 1, 2007, at 11:27 PM, Chelonian wrote:
>
> I'm new to matplotlib, and I can't even get this to work (let alone
> the
> other fix of changing the colors). Could you elaborate about how to
> implement this? I've tried putting these lines in the __init__ of the
> PlotPanel() class, but I can't get it. Any help is appreciated,
> thank you.
It sounds like you're using WxMpl to embed matplotlib in something.
If that's the case, you should look at the example code below.
Otherwise, please send a short example script to the list.
Also, please note that disabling the frame effectively makes the
figure's background transparent when using the WXAgg backend. I'm
not sure if this is the intended behavior. If that's not what you
want, you can probably just set the Figure's face and edge colors to
the same thing using Figure.set_edgecolor() and Figure.set_facecolor().
Ken
import wxmpl
import wx
class MyPlotPanel(wxmpl.PlotPanel):
def __init__(self, parent, id, **kwds):
wxmpl.PlotPanel.__init__(self, parent, id, **kwds)
fig = self.get_figure()
fig.set_frameon(False)
if __name__ == '__main__':
app = wx.PySimpleApp()
frame = wx.Frame(None, -1, 'Frame Off')
panel = MyPlotPanel(frame, -1)
szr = wx.BoxSizer(wx.VERTICAL)
szr.Add(panel, 1, wx.EXPAND|wx.ALL, 5)
frame.SetSizer(szr)
frame.Fit()
axes = panel.get_figure().gca()
axes.plot([0,1,2,3,4,5])
frame.Show(True)
app.MainLoop()
|
|
From: Flavio C. <fcc...@gm...> - 2007-04-03 13:38:42
|
Hi,
I want to animate a scatter plot using the pylab interface. Something like
this:
ion()
s=3Dscatter(x,y,s,c)
for i in range (10):
#update data
s.draw()
s is a RegularPolyCollection and thuse does not have a set_data method.
How am I supposed to update the data so that I can modify the plot?
--=20
Fl=E1vio Code=E7o Coelho
registered Linux user # 386432
get counted at http://counter.li.org
---------------------------
"software gets slower faster than hardware gets faster"
Niklaus Wirth's law
|
|
From: Jeff W. <js...@fa...> - 2007-04-03 13:27:38
|
Simon Kammerer wrote:
> Hi list,
>
> what's the best (meaning most efficient/fastest) way to plot grid
> point values on a map created with basemap?
>
> I'd like to plot the raw values of my data-array to the correspondig
> gridpoints, instead of having it transformed to something like contour
> or contourf. The ne plus ultra would be the ability to assing a
> colormap, to control the font color of the plotted values...
>
> Regards
> Simon
>
>
Simon: I don't know about efficiency, but this does what you want:
from pylab import show, title, arange, figure, title, arccos, pi, cm,
text, sqrt
from matplotlib.colors import rgb2hex
from matplotlib.toolkits.basemap import Basemap
from matplotlib.numerix.random_array import uniform
# Plot a bunch of randomly distributed points on the earth.
# set up stereographic map centered on N. Pole.
m = Basemap(lon_0=-105,boundinglat=30.,resolution='l',
area_thresh=10000.,projection='npstere')
# number of points to plot.
npts = 300
# generate random points on a sphere,
# so that every small area on the sphere is expected
# to have the same number of points.
# http://mathworld.wolfram.com/SpherePointPicking.html
try: # this works for numpy
u = uniform(0.,1.,size=npts)
v = uniform(0.,1.,size=npts)
z = uniform(0,100,size=npts)
except: # this works for Numeric/numarray
u = uniform(0.,1.,shape=npts)
v = uniform(0.,1.,shape=npts)
z = uniform(0,100,shape=npts)
lons = 360.*u
lats = (180./pi)*arccos(2*v-1) - 90.
# transform lons and lats to map coordinates.
x,y = m(lons,lats)
# create a list of strings containing z values
zn = [ '%2i' % zz for zz in z ]
# plot numbers on map, colored by value.
vmin = 0; vmax = 100
cmap = cm.jet # use 'jet' colormap
for name,zval,xpt,ypt in zip(zn,z,x,y):
# only plot values inside map region.
if xpt > m.xmin and xpt < m.xmax and ypt > m.ymin and ypt < m.ymax:
rgbcolor = cmap(1.-(zval-vmin)/(vmax-vmin))[:3]
hexcolor = rgb2hex(rgbcolor)
text(xpt,ypt,name,fontsize=9,weight='bold',color=hexcolor)
# draw coasts and fill continents.
m.drawcoastlines(linewidth=0.5)
m.fillcontinents()
# draw parallels and meridians.
delat = 20.
circles = arange(0.,90.,delat).tolist()+\
arange(-delat,-90,-delat).tolist()
m.drawparallels(circles)
delon = 45.
meridians = arange(0,360,delon)
m.drawmeridians(meridians,labels=[1,1,1,1])
title('Random Data Value at Random Points',y=1.075)
show()
HTH,
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
S
|
|
From: Gary R. <gr...@bi...> - 2007-04-03 13:27:31
|
I have to agree with Giorgio in general. Unfortunately, the threading support required by matplotlib isn't implemented in pyScripter, which means that it's a nice environment until you want to do some plotting, when it becomes a bit flaky. I haven't checked eclipse's behaviour with matplotlib. Gary R. Giorgio F. Gilestro wrote: > A really great IDE for windows users is pyScripter ( > http://mmm-experts.com/Products.aspx?ProductId=4 ) > It's probably the best I could try so far (and it's free). > > cheers > > On 3/30/07, Tim Hirzel <hi...@re...> wrote: >> As for a good IDE. I really like eclipse with pydev. For easy >> student/beginner setup, easyclipse has a nice python eclipse distribution >> >> http://www.easyeclipse.org/site/distributions/index.html >> >> I think I've tried near every python IDE setup out there over the last >> couple years, and this one wins for me. >> >> tim |
|
From: Pellegrini E. <eri...@ya...> - 2007-04-03 13:01:58
|
Hi evebrybody, I started a discussion one week ago about a problem of memory leak using the following code: ******************************************************************************** from Tkinter import * from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import pylab def display(): mat = pylab.zeros((100,100)) pylab.ioff() image = pylab.matshow(mat) pylab.ion() pylab.close() can = FigureCanvasTkAgg(image, master=frame) can.show() can.get_tk_widget().grid(row = 0,column = 0) root = Tk() frame = Frame(root) frame.grid(row = 0,column = 0) canvas = Canvas(frame, width = 240, height = 240, relief = "sunken", bg = "white") canvas.grid() button = Button(root,text="DisplayMatrix",command = display) button.grid(row = 1,column = 0) ******************************************************************************* up to now, I have not found any way to solve it and unfortunately the proposed hints did not solve the problem (gc_collect(), clf(), cla()). Is there something new about this ? thanks Eric --------------------------------- Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses. |
|
From: Giorgio L. <gio...@ch...> - 2007-04-03 12:25:45
|
Hello Dear All, I just have a question for all that uses python/numpy/scipy/matplotlib for making science. I use with no problem in my computer python+numpy+scipy+matplotlib and I'm very satisfied with them. I was a matlab user. I still not have unearthed the power ot python but I'm happy to use a programming language and not a metalanguage. When I gave people my software (in matlab) the all ask me if I could compile and create some interface. I tried to use matlab GUIs, succeded in creating, but then I had a lot of problems. Compiling not always worked. after compiling you have not a workspace and so I had to make all output as txt files... and so on. Now that I use python I'm again with the same problem. I create easy routines (for chemometrics) and then people ask me if I can make a standalone program with interface. I used orange and for NN it's surely one of the best, but I'm not good at programming widgets. Then I think about it, searched the web and didn't find anything. What I'm searching is something similar to labview :) At first I thought ... hey why people wat an interface, just use the console, and then after listening to their reason I have to agree. What do I generally do ? I have a matrix in txt, I apply my routines (a SVD, a PCA, a filter etc etc written in python), plot them (using maplotlib) and then I want an output. that's it. I started looking at various Qt etc. etc. but for me it's overhelming, because I think that the most important part should be dedicate to the routines creation and not to making a gui, compiling, etc. etc. I need simple command like people wants. grids, paste and copy, small working plots :) I mean I can get crazy with setting my program, importing etc. etc. but I also have to say that needs and claim about writing simple guis, common paste and copy etc should be considered from someone there (we wait for the help of some guru that makes things easier ;) thanks for reading the mail Giorgio |
|
From: Giorgio L. <gio...@ch...> - 2007-04-03 12:21:05
|
Hello Werner,
here is the file I try to compile.
It gave an error of missing DLL when i try to launch :(
no Idea why, since with you example everything works
(I'm using maplotlib 0.87.7)
Giorgio
------------------------------------------------------------------------
import pylab as pyl
from scipy import *
from pyautosct import *
x=pyl.load('c:/temp/iris.txt')
#def pynipals
#return (lmat,smat,qcont,tcont,smat2,qcont2,tcont2)
[o,c]=x.shape
aut=raw_input('Autoscale data [y] or [n] ?')
# Start of autoscaling
if aut=='y':
vard=var(x,axis=0)*(o/(o-1.0))
stdn=sqrt(vard)# it differs from std in Matlab(tm) where std is normalised
stdon=ones((o,1))*stdn
xmeann=ones((o,1))*x.mean(axis=0)
xnorm=(x-xmeann)/stdon
x=xnorm
# End of autoscaling
smat=zeros((o,c))
lmat=zeros((c,c))
xt=x
if o>c:
vp=zeros((1,o))
varexp=zeros((1,o))
else:
vp=zeros((1,c))
varexp=zeros((1,c))
t=0
vartot=(x**2).sum()
sts=raw_input('Variance to be retained (max 99) ?')
st=int(sts)
st=round(st,1)
while vp.sum()<st:
t=t+1
ss=(x**2).sum(axis=0)
#ss=round_(ss, decimals=8)
a=sort(ss)
b=ss.argsort(kind='merge')
xmax=xt[:,b[c-1]]
s=(xmax*xmax).sum()
diffi=1000
while diffi>0.0000001:
rmax=dot(xmax,xt)/s
rmaxsq=(rmax*rmax).sum()
rmax=rmax/sqrt(rmaxsq)
xmax=dot(xt,rmax)
s2=(xmax*xmax).sum()
diffi=abs(s2-s)
s=s2
smat[:,t-1]=xmax
lmat[t-1,:]=rmax
varexp[0,t-1]=(xmax*xmax).sum()
vp[0,t-1]=varexp[0,t-1]/vartot*100
xmaxc=xmax[:,pyl.NewAxis]
xt=xt-xmaxc*rmax
print vp
print diffi
ncs=raw_input('How many components ?')
nc=int(ncs)
lmat=lmat[arange(0,nc),:]
smat=smat[:,arange(0,nc)]
[a,b]=smat.shape
##### Computation of T2 values
t2=zeros((o,1))
vvv=zeros((nc,nc))
for i in arange(1,nc+1):
vvv[i-1,i-1]=varexp[0,i-1]/(o-1)
for i in arange(1,o+1):
t2[i-1]= dot(dot(smat[i-1,arange(0,nc)],linalg.inv(vvv)),smat[i-1,arange(0,nc)])
### T2 contributions
ssq=empty((nc,1))
for i in arange(1,nc+1):
ssq[i-1,0]=vvv[i-1,i-1]
h=(1./sqrt(ssq))
k=h[:,0]
#it has to be a vector before using diag
tcont=dot(dot(dot(x,lmat.transpose()),diag((k))),lmat)
#Comparison with matlab -= ok =-
# Computation of Q values based on cross-validation (ng deletion groups)
ng=5;
q=zeros((o,1))
qcont=zeros((o,c))
for g in arange(1,ng+1):
t=arange(g,o+1,ng)
smattr=zeros((o,c))
lmattr=zeros((c,c))
xtr=x;
xtr=delete(xtr,t-1, axis=0)
xev=x[t-1,:]
[rtr,c]=xtr.shape
if aut=='y':
sst=diag(ones((rtr,1))*std(xtr,axis=0)*sqrt((rtr/(rtr-1.0))))
jj1=min(sst)
jj2=argmin(sst)
if jj1==0:
print 'Error: variable ', int(jj2), ' constant in group ', int(g)
aa=pyautosct(xtr,xev)
xtr=aa[arange(0,rtr),:]
[aah,aak]=aa.shape
xev=aa[arange(rtr,size(aa,0)),:]
#Comparison with matlab -= ok =-
xttr=xtr
[ttrh,ttrk]=xttr.shape
tt=0
##checked
while tt<nc:
smattr=zeros((ttrh,nc))
lmattr=zeros((nc,c))
tt=tt+1
ss=(xttr**2).sum(axis=0)
a2=sort(ss)
b2=ss.argsort(kind='merge')
xmax=xttr[:,b2[c-1]]
s=(xmax*xmax).sum()
##checked
diffi=1000
while diffi>0.0000001:
rmax=dot(xmax,xttr)/s
rmaxsq=(rmax*rmax).sum()
rmax=rmax/sqrt(rmaxsq)
xmax=dot(xttr,rmax)
s2=(xmax*xmax).sum()
diffi=abs(s2-s)
s=s2
##checked
smattr[:,tt-1]=xmax
lmattr[tt-1,:]=rmax
xmaxc=xmax[:,pyl.NewAxis]
xttr=xttr-xmaxc*rmax
smatev=dot(xev,lmattr.transpose())
reconstrev=dot(smatev,lmattr)
for i in arange(1,size(xev,0)+1):
tind=t-1
q[tind[i-1]]=((reconstrev[i-1,:]-xev[i-1,:])*(reconstrev[i-1,:]-xev[i-1,:])).sum()
qcont[tind[i-1]]=(reconstrev[i-1,:]-xev[i-1,:])**2
print 'smat'
print smat
print 'lmat'
print lmat
print 'tcont'
print tcont
print 'qcont'
print qcont
|
|
From: Giorgio L. <gio...@ch...> - 2007-04-03 10:13:00
|
I tried to compile the file and it seems to work (send by Werner). I'm also interested in the problem since I cannot succeed in compiling too with matplotlib (already followed the instruction found on py2exe) Hope to see how it develop and happy to know if anyone succeed in doing it Giorgio > |
|
From: Eric F. <ef...@ha...> - 2007-04-03 08:28:53
|
I think the problems with imshow and matshow of integer arrays are fixed now in svn. Eric Suresh Pillai wrote: > So I been using the log scale provided by matplotlib.colors.LogNorm, but > have been seing bizarre behaviour. Basically, high values are not > displayed properly. I give simple examples below with just two possible > values in the matrix, but all the same issues arise with more varied > values. > > First notice that the high value (100000) is displayed as being of > value=1: > > from pylab import * > from matplotlib.colors import LogNorm > > matrix = ones((30,30)) > matrix = matrix*440 > matrix[29,29] = 100000 > > matshow(matrix, norm=LogNorm(vmin=1, vmax=1000000)) > colorbar() > show() > > The cutoff value for incorrect display (for the scale I am using) seems to > be at 32000: > > from pylab import * > from matplotlib.colors import LogNorm > > matrix = ones((30,30)) > matrix = matrix*440 > matrix[29,29] = 32000 > > matshow(matrix, norm=LogNorm(vmin=1, vmax=1000000)) > colorbar() > show() > > However, if the value is really high, the color displayed changes again, > although still not to the correct color (please try with values 918000, > 920000, and 999000 to see see it progress): > > from pylab import * > from matplotlib.colors import LogNorm > > matrix = ones((30,30)) > matrix = matrix*440 > matrix[29,29] = 918000 > > matshow(matrix, norm=LogNorm(vmin=1, vmax=1000000)) > colorbar() > show() > > And if one specifies no limits to LogNorm, the colorbar displayed is > incomplete and the colour displayed is wrong in a different way then when > specifying the limits (try value = 999000 as well). > > from pylab import * > from matplotlib.colors import LogNorm > > matrix = ones((30,30)) > matrix = matrix*440 > matrix[29,29] = 918000 > > matshow(matrix, norm=LogNorm()) > colorbar() > show() > > > Either I am completely missing something or there is a major bug. > > I am using mpl checked out from svn on 26 March. > > Thanks, > Suresh > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Simon K. <sim...@we...> - 2007-04-03 08:04:54
|
Hi list, what's the best (meaning most efficient/fastest) way to plot grid point values on a map created with basemap? I'd like to plot the raw values of my data-array to the correspondig gridpoints, instead of having it transformed to something like contour or contourf. The ne plus ultra would be the ability to assing a colormap, to control the font color of the plotted values... Regards Simon |