I use a function to make four plot calling two subfunction.the plot are called plotrisp and plotlev in everyone of them any tome i use a figure I also close it. But if I only use one fuction it do the plot. WhenI try to use them to plot no way it stuck in the end. So I had the same problem while calling multiple plots with multiple function
Any help would be appreciated and sorry for the dup post
nstep=30 Giorgio
from numpy import * import pylab as p import matplotlib.axes3d as p3 # plots leverage plot (3d surface+ contour) def pyplotrisp (b,nstep,gr,lab): h=lab.size risp2=empty((h,1)) ir=1 for j in arange(1,nstep+2): #a=gr[[arange(ir-1,ir+nstep)],:] b2=gr[arange(ir-1,ir+nstep)] #flev=dot(a2,dot(disper,a2.transpose())) crisp=dot(b2,b) risp2=hstack((risp2,crisp)) print ir print crisp print risp2 ir=ir+nstep+1 [M,L]=risp2.shape risp=risp2[:,arange(1,L)] print risp p.figure ic=p.contour(risp) p.clabel(ic) p.axis('scaled') p.close H,K = meshgrid(lab,lab) fig2=p.figure() ax2=p3.Axes3D(fig2) ax2.plot_wireframe(H,K,risp) p.close p.show() return risp
9.799999999999985400e-001 -1.000000000000005400e-002 -4.166666666666658800e-003 -2.833333333333330800e-002 -1.000000000000009200e-002 -2.499999999999993500e-003 2.500000000000009200e-003 3.750000000000029400e-003 8.750000000000047700e-003 -7.499999999999978900e-003 -7.500000000000020500e-003 1.250000000000126000e-003 -1.249999999999765200e-003 -2.499999999999627500e-003 1.250000000000403600e-003
3.333333333333343100e-001 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 0.000000000000000000e+000 -8.333333333333362000e-002 -8.333333333333362000e-002 -8.333333333333362000e-002 -8.333333333333362000e-002 8.063693575130939100e-018 4.166666666666667100e-002 -7.466696441424020800e-018 5.442898171701501700e-018 7.446831533558328100e-019 -3.981296423947523400e-033 -1.360311859369367600e-033 -2.812828735141543300e-034 2.259947026447235500e-034 4.390808650062400600e-034 2.734628002940427000e-034 -2.510159939866114900e-020 2.428167867294735600e-018 -5.737360769959190400e-018 -5.737360769959193500e-018 7.598154529375859700e-034 2.750670794648198700e-018 4.166666666666665700e-002 3.252606517456512100e-018 -6.938893903907227600e-018 1.881266115781307300e-017 3.001737606745200000e-018 5.357418870882074000e-018 3.920093381513243500e-018 -1.596487216230838300e-018 -1.471631841958520700e-018 -2.529653004892762600e-018 1.914546345013781500e-018 -3.639574377949061200e-018 4.254681037828040000e-018 1.916232971842715000e-033 7.209827103475922500e-018 -4.119968255444918400e-018 4.166666666666664400e-002 1.561251128379126400e-017 -4.703165289453265200e-018 -7.504344016863050200e-019 -1.339354717720509800e-018 -9.800233453782993300e-019 3.991218040577071800e-019 3.679079604896299400e-019 1.723793026891109400e-018 3.943329065986273500e-018 -4.599879633360827600e-018 -1.067242459516556400e-018 4.890066054477537100e-034 3.394879081475125300e-018 -8.673617379884024700e-018 -6.938893903907231500e-018 4.166666666666663700e-002 -1.811248849411297100e-017 -1.232649058115857300e-017 1.260633175768506600e-017 9.526091405915190700e-018 -3.432681590033676600e-018 -5.421953771683235600e-018 -4.263287963462097500e-018 1.350262687099568600e-018 1.104875764931516900e-018 1.808149511431011000e-018 2.536890719600698900e-033 4.063726437323978200e-033 -2.699487135751760500e-018 6.748717839379484200e-019 -2.010183206209276600e-017 6.249999999999998600e-002 -2.602085213965210600e-017 2.602085213965210600e-018 -4.336808689942017700e-019 3.903127820947816000e-018 1.734723475976807100e-018 -2.232219446375430500e-018 2.232219446375430500e-018 5.985072623326622900e-018 -5.985072623326622900e-018 2.032214496590675000e-034 1.708373769186458100e-033 -3.999004283483412900e-018 9.997510708708580400e-019 -9.467257814775494300e-018 -3.903127820947816000e-018 6.250000000000000000e-002 3.469446951953614200e-018 -3.469446951953614200e-018 -1.561251128379126400e-017 -3.469446951953614200e-018 -8.643269201659448900e-018 8.643269201659450400e-018 1.550313073537109300e-018 -1.550313073537111600e-018 8.648904567117544200e-034 -1.478880281038128200e-033 2.724989909059686100e-018 -6.812474772649243300e-019 8.162894818485949200e-018 -1.561251128379126400e-017 1.387778780781445700e-017 6.249999999999999300e-002 1.040834085586084300e-017 1.040834085586084300e-017 8.673617379884035500e-018 -5.233474198618490000e-018 5.233474198618489200e-018 7.275153256153026200e-019 -7.275153256153018500e-019 1.781786392369606100e-033 4.846674875901112200e-034 6.992820730148195700e-018 -1.748205182537053500e-018 1.480151666370521800e-017 -3.903127820947816000e-018 5.204170427930421300e-018 -6.938893903907228400e-018 6.249999999999999300e-002 -1.908195823574487800e-017 -2.688821387764051000e-017 -3.081121126393534000e-018 3.081121126393530900e-018 -3.027135001804601100e-019 3.027135001804628100e-019 -1.164292971557214400e-035 4.796348008079764500e-035 -2.173498628877410200e-018 5.433746572193533100e-019 -3.831899699528059300e-018 1.734723475976807100e-018 -4.336808689942017700e-018 5.204170427930421300e-018 -1.214306433183765000e-017 6.249999999999997200e-002 6.071532165918824800e-018 -6.222531836829138000e-018 6.222531836829137300e-018 2.962968600580594400e-019 -2.962968600580592500e-019 1.424658213350358300e-034 1.911957682938360900e-034 3.416412657434619600e-019 -8.541031643586433400e-020 -1.544796075801442200e-018 -3.469446951953614200e-018 6.938893903907228400e-018 5.204170427930421300e-018 -6.938893903907228400e-018 -2.341876692568689600e-017 6.250000000000001400e-002 -1.058216290976355200e-018 1.058216290976355600e-018 -1.632313148911042800e-020 1.632313148910965800e-020 -8.333333333333355100e-002 -3.164743174143926800e-018 3.267408306701074900e-018 2.293328386393010900e-018 2.822591408282661800e-018 6.751854316584569600e-018 -1.404071806107358700e-017 2.315712276229886100e-017 2.872117569040359400e-017 -1.251899721480755100e-017 2.325689429576632500e-018 4.687500000000005600e-002 1.562500000000006900e-002 1.562500000000006200e-002 1.562500000000006200e-002 -8.333333333333355100e-002 -8.829449364686222000e-019 3.935871204789636300e-018 1.866225171310140700e-018 -3.654884344386240600e-018 -6.751854316584568800e-018 1.404071806107359000e-017 -2.315712276229885800e-017 -2.872117569040360000e-017 1.251899721480755100e-017 -2.325689429576633200e-018 1.562500000000006600e-002 4.687500000000005600e-002 1.562500000000006600e-002 1.562500000000006600e-002 -8.333333333333355100e-002 2.023844055306276600e-018 1.034277764351037600e-019 -2.392726295223344500e-018 1.014005015402538800e-017 -2.498101954199176700e-017 -1.256108395995685400e-017 6.344568522399848200e-019 7.289284264553220800e-019 -6.895940862229402100e-020 -4.964955178121291000e-019 1.562500000000006600e-002 1.562500000000006200e-002 4.687500000000006900e-002 1.562500000000006200e-002 -8.333333333333355100e-002 2.023844055306273500e-018 -7.306707287925812800e-018 -1.766827262479806400e-018 -9.307757217921808300e-018 2.498101954199176100e-017 1.256108395995685100e-017 -6.344568522399869400e-019 -7.289284264553245900e-019 6.895940862229457500e-020 4.964955178121294900e-019 1.562500000000006600e-002 1.562500000000006200e-002 1.562500000000006200e-002 4.687500000000006900e-002
gr.tar.tar.bz2
Description: Binary data
-1.000000000000000000e+000 -9.333333333333333500e-001 -8.666666666666667000e-001 -8.000000000000000400e-001 -7.333333333333333900e-001 -6.666666666666667400e-001 -6.000000000000000900e-001 -5.333333333333334400e-001 -4.666666666666667900e-001 -4.000000000000001300e-001 -3.333333333333334800e-001 -2.666666666666668300e-001 -2.000000000000001800e-001 -1.333333333333335300e-001 -6.666666666666687400e-002 -2.220446049250313100e-016 6.666666666666643000e-002 1.333333333333330800e-001 1.999999999999997300e-001 2.666666666666663900e-001 3.333333333333330400e-001 3.999999999999996900e-001 4.666666666666663400e-001 5.333333333333329900e-001 5.999999999999996400e-001 6.666666666666663000e-001 7.333333333333329500e-001 7.999999999999996000e-001 8.666666666666662500e-001 9.333333333333329000e-001 9.999999999999995600e-001
# plots leverage plot (3d surface+ contour) from numpy import * import pylab as p import matplotlib.axes3d as p3 #nstep 30 doesnt' work #nstep 2 ok def pyplotlev(disper,nstep,gr,lab): h=lab.size lev2=empty((1,h)) ir=1 for j in arange(1,nstep+2): #a=gr[[arange(ir-1,ir+nstep)],:] a2=gr[arange(ir-1,ir+nstep)] #flev=dot(a2,dot(disper,a2.transpose())) clev=diag(dot(a2,dot(disper,a2.transpose()))) lev2=vstack((lev2,clev)) #print ir #print clev #print h ir=ir+nstep+1 lev=lev2[1:,] #print lev fig=p.figure(1) H,K = meshgrid(lab,lab) ax=p3.Axes3D(fig) ax.plot_wireframe(H,K,lev) p.close fig2=p.figure(2) ic=p.contour(lev) p.clabel(ic) p.axis('scaled') p.close p.show() return lev
------------------------------------------------------------------------- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users