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
(12) |
2
(14) |
3
(13) |
4
(6) |
|
5
(6) |
6
(21) |
7
(29) |
8
(30) |
9
(13) |
10
(4) |
11
(4) |
|
12
(4) |
13
(15) |
14
(22) |
15
(23) |
16
(23) |
17
(9) |
18
(23) |
|
19
(12) |
20
(10) |
21
(26) |
22
(5) |
23
(32) |
24
(5) |
25
(7) |
|
26
(4) |
27
(3) |
28
(19) |
29
(20) |
|
|
|
|
From: Nils W. <nw...@ia...> - 2012-02-20 15:32:34
|
Hi all,
How can I improve the presentation of yticks for a small y
range, e.g.
>> y_min,y_max = ax.get_ylim()
>>> y_max-y_min
8.9999999999996767e-07
I would like to avoid "+1.992 x 10^{-4}" in the attached
figure.
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter
formatter = ScalarFormatter(useMathText=True)
formatter.set_scientific(True)
formatter.set_powerlimits((-15,15))
#A = np.loadtxt('trash.dat')
A = np.array([[ 1.00000000e+00, 0.00000000e+00,
1.99236400e-04],
[ 2.00000000e+00, 1.00000000e+00,
2.00043800e-04],
[ 3.00000000e+00, 2.00000000e+00,
2.00046000e-04],
[ 4.00000000e+00, 3.00000000e+00,
2.00043900e-04]])
fig = plt.figure()
ax = fig.add_subplot(111)
ax.yaxis.set_major_formatter(formatter)
ax.plot(A[:,1],A[:,2])
y_min,y_max = ax.get_ylim()
print 'y range', y_max-y_min
plt.show()
Nils
|
|
From: Eric F. <ef...@ha...> - 2012-02-20 06:19:24
|
On 02/19/2012 07:46 PM, Khary Richardson wrote: > Hi Eric, > > Ok I guess I have a bigger problem. The plot window opens,but nothing > is plotted. I thought that the blank window was because the code was > hanging and not plotting. I had it work once and plot, but now I just > get the blank window. Khary, (Please keep correspondence on the list so others can jump in, and whatever answer emerges is available to others.) You need to provide more information: operating system, mpl version, backend, how you installed it. Some systematic troubleshooting is also in order. Start here: http://matplotlib.sourceforge.net/faq/index.html. Eric > > Khary > > On Mon, Feb 20, 2012 at 12:25 AM, Eric Firing <ef...@ha... > <mailto:ef...@ha...>> wrote: > > On 02/19/2012 07:08 PM, surfcast23 wrote: > > > > Hi I wrote the following script, but it hangs right after > plt.show(). I would > > really appreciate it if someone could take a look and let me know > where I'm > > messing up. Thanks in advance > > That's what show() does in a script--it displays the plot and blocks > execution until you close the window. It can be more complicated than > that depending on the version of mpl you are running. So, what version > are you running, and what is the behavior you are trying to achieve? An > animation? > > Eric > > > > > from numpy import * > > import matplotlib.pyplot as plt > > > > #H=p^2/2-cosq > > #p=dp=-dH/dq > > #q=dq=dH/dp > > > > t = 0 > > h = 0.5 > > pfa = [] #Create arrays that will hold > pf,qf values > > qfa = [] > > > > while t< 10: > > q = 1+t > > p = -sin(q+t) > > > > p1 = p > > q1 = q > > p2 = p + h/2*q1 > > q2 = q + h/2*p1 > > p3 = p+ h/2*q2 > > q3 = q+ h/2*p2 > > p4 = p+ h/2*q3 > > q4 = q+ h/2*p4 > > pf = (p +(h/6)*(p1+2*p2+3*p3+p4)) > > qf = (q +(h/6)*(q1+2*q2+3*q3+q4)) > > #pf = log10(pf) #Convert to log scale > > #qf = log10(qf) > > pfa.append(pf) #append arrays > > qfa.append(qf) > > t += h #increase time step > > > > print("test") > > plt.plot(pfa,qfa) > > print("test1") > > plt.show() > > print("tes2t") > > > > > > > > > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > StriperCoast SurfCasters Club > |
|
From: Eric F. <ef...@ha...> - 2012-02-20 05:25:51
|
On 02/19/2012 07:08 PM, surfcast23 wrote:
>
> Hi I wrote the following script, but it hangs right after plt.show(). I would
> really appreciate it if someone could take a look and let me know where I'm
> messing up. Thanks in advance
That's what show() does in a script--it displays the plot and blocks
execution until you close the window. It can be more complicated than
that depending on the version of mpl you are running. So, what version
are you running, and what is the behavior you are trying to achieve? An
animation?
Eric
>
> from numpy import *
> import matplotlib.pyplot as plt
>
> #H=p^2/2-cosq
> #p=dp=-dH/dq
> #q=dq=dH/dp
>
> t = 0
> h = 0.5
> pfa = [] #Create arrays that will hold pf,qf values
> qfa = []
>
> while t< 10:
> q = 1+t
> p = -sin(q+t)
>
> p1 = p
> q1 = q
> p2 = p + h/2*q1
> q2 = q + h/2*p1
> p3 = p+ h/2*q2
> q3 = q+ h/2*p2
> p4 = p+ h/2*q3
> q4 = q+ h/2*p4
> pf = (p +(h/6)*(p1+2*p2+3*p3+p4))
> qf = (q +(h/6)*(q1+2*q2+3*q3+q4))
> #pf = log10(pf) #Convert to log scale
> #qf = log10(qf)
> pfa.append(pf) #append arrays
> qfa.append(qf)
> t += h #increase time step
>
> print("test")
> plt.plot(pfa,qfa)
> print("test1")
> plt.show()
> print("tes2t")
>
>
>
>
|
|
From: surfcast23 <sur...@gm...> - 2012-02-20 05:08:42
|
Hi I wrote the following script, but it hangs right after plt.show(). I would
really appreciate it if someone could take a look and let me know where I'm
messing up. Thanks in advance
from numpy import *
import matplotlib.pyplot as plt
#H=p^2/2-cosq
#p=dp=-dH/dq
#q=dq=dH/dp
t = 0
h = 0.5
pfa = [] #Create arrays that will hold pf,qf values
qfa = []
while t < 10:
q = 1+t
p = -sin(q+t)
p1 = p
q1 = q
p2 = p + h/2*q1
q2 = q + h/2*p1
p3 = p+ h/2*q2
q3 = q+ h/2*p2
p4 = p+ h/2*q3
q4 = q+ h/2*p4
pf = (p +(h/6)*(p1+2*p2+3*p3+p4))
qf = (q +(h/6)*(q1+2*q2+3*q3+q4))
#pf = log10(pf) #Convert to log scale
#qf = log10(qf)
pfa.append(pf) #append arrays
qfa.append(qf)
t += h #increase time step
print("test")
plt.plot(pfa,qfa)
print("test1")
plt.show()
print("tes2t")
--
View this message in context: http://old.nabble.com/Script-hanging-during-plot-of-Runge-Kutta-tp33354840p33354840.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Jerzy K. <jer...@un...> - 2012-02-19 23:46:52
|
Jeff Whitakert : > Jose Guzman: >> ... >> >>> imshow(W, cmap=cm.binary) # W is a Numpy Array with shape (100,100) >> >> However, this does not work the way i would like (the ones appear >> very blur). I would need the correct representation of a grid where >> the possition 0,0 is simply the entry W[0,0] of my array. >> > > Jose: I think you need to add interpolation='nearest' to get rid of > the blurriness. A. This is one possibility. B. The - mentioned previously - matshow, is another one. C. figimage(W,cmap=cm.binary) is a third one ; here the scale is one to one in pixels, independently of the figsize. D. Specific backend image plotting is yet another one, if somebody needs really to work hard. Jerzy K. |
|
From: Jeff W. <js...@fa...> - 2012-02-19 22:39:21
|
On 2/19/12 1:18 PM, Jose Guzman wrote: > Dear matplotlib users, > > I am trying to plot a nxn symetric matrix containing zeros (in white) > and ones (in black). Quite simple, I guessed. For that I use imshow as > follows: > > >>> imshow(W, cmap=cm.binary) # W is a Numpy Array with shape (100,100) > > However, this does not work the way i would like (the ones appear very > blur). I would need the correct representation of a grid where the > possition 0,0 is simply the entry W[0,0] of my array. > > There should be an easy way to plot this matrix, bu I cannot figure it > out. > > Thanks for your help in advance. > > Jose Jose: I think you need to add interpolation='nearest' to get rid of the blurriness. -Jeff |
|
From: Eric F. <ef...@ha...> - 2012-02-19 20:47:37
|
On 02/19/2012 10:18 AM, Jose Guzman wrote: > Dear matplotlib users, > > I am trying to plot a nxn symetric matrix containing zeros (in white) > and ones (in black). Quite simple, I guessed. For that I use imshow as > follows: > > >>> imshow(W, cmap=cm.binary) # W is a Numpy Array with shape (100,100) > > However, this does not work the way i would like (the ones appear very > blur). I would need the correct representation of a grid where the > possition 0,0 is simply the entry W[0,0] of my array. > > There should be an easy way to plot this matrix, bu I cannot figure it out. Did you try matshow? Eric > > Thanks for your help in advance. > > Jose > > > > ------------------------------------------------------------------------------ > 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: Jose G. <sjm...@go...> - 2012-02-19 20:20:06
|
Dear matplotlib users, I am trying to plot a nxn symetric matrix containing zeros (in white) and ones (in black). Quite simple, I guessed. For that I use imshow as follows: >>> imshow(W, cmap=cm.binary) # W is a Numpy Array with shape (100,100) However, this does not work the way i would like (the ones appear very blur). I would need the correct representation of a grid where the possition 0,0 is simply the entry W[0,0] of my array. There should be an easy way to plot this matrix, bu I cannot figure it out. Thanks for your help in advance. Jose |
|
From: Limping_Twerp <kai...@go...> - 2012-02-19 18:54:42
|
Hey guys,
how do I configure my plot in a way that there arent framed axes but cross -
section -axes? I talk about this
|
|
|
|
|
____________|______________
|
|
|
|
|
Any help?
--
View this message in context: http://old.nabble.com/Cross-Section-Axes-%28Not-framed%29-tp33353010p33353010.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: John H. <jd...@gm...> - 2012-02-19 16:53:55
|
On Sun, Feb 19, 2012 at 10:15 AM, Jerzy Karczmarczuk < jer...@un...> wrote: > I believe that the list owners will have to strenghten some tools to > fight against all those shameless spammers. > > I wade through about 20 gated messages a day in the mpl administrative interface. 90% are spam, the remainder are legitimate. Most spammers just post to the list without bothering to subscribe, so we catch most of them in the administrative interface. Apparently "debl" either subscribed or hijacked the account of a subscriber. I think we get no more than a few spams a year, so we aren't doing too badly. The vacation auto-responders are getting to be an annoyance though -- any of you who use them please configure them not to respond to mailing list traffic. i unsubscripted debl, our most recent spammer, so we'll see how that works. JDH |
|
From: Jerzy K. <jer...@un...> - 2012-02-19 16:15:52
|
I believe that the list owners will have to strenghten some tools to fight against all those shameless spammers. Jerzy Karczmarczuk |
|
From: <de...@ve...> - 2012-02-19 16:04:58
|
This is very effective http://hyset.com.ar/message.php?Catherine I liked it. |
|
From: yamiddu <ya...@gm...> - 2012-02-19 15:41:59
|
Hi all, I just tried to use the uplims=True option in matplotlib errorbars to plot some upper limits, and it turns out that the arrow is upward directed... Now, an upper limit should mean that the measurement of a certain quantity has excluded all higher values and that the true value may be smaller than the limit set, i.e. the arrow should be directed downward. Isn't it? same thing for the lolims option, in that case arrows should be directed upwards. or is there something I'm missing? -- View this message in context: http://old.nabble.com/errorbar-uplims-and-lolims-reversed--tp33352206p33352206.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Ray O. <RO...@an...> - 2012-02-19 14:03:10
|
I think you're right. Even if there is a work-around, it can't be right for the colorbar to change without affecting the image. I've filed issue #708. Thanks, Ray On Feb 19, 2012, at 4:37 AM, Jae-Joon Lee wrote: > As far as I can see, this is a bug of matplolib, although calling a set_data work around this. Can you open a bug report in our github repo? > > -JJ > 2012. 2. 18. 오후 10:12에 "Ray Osborn" <RO...@an...>님이 작성: > You're exactly right. That does fix it. Unfortunately, it means I have to refactor some of my code because the Pyside slot doesn't currently have access to the original data, but that's not a huge deal. > > Thanks, > Ray > > On Feb 18, 2012, at 4:35 AM, Jerzy Karczmarczuk wrote: > > > Ray Osborn: > >> > >> OK - it turns out I can reproduce it in a simple ipython session using ipython --pylab=qt. > >> > >> I set up an image plot as follows: > >> > >> import numpy as np > >> import matplotlib.pyplot as plt > >> from matplotlib.image import NonUniformImage > >> > >> x=y=np.linspace(0,2*np.pi,101) > >> X,Y=np.meshgrid(x,y) > >> z=sin(X)*sin(Y) > >> > >> ax=plt.gca() > >> extent = (x[0],x[-1],y[0],y[-1]) > >> im = NonUniformImage(ax, extent=extent, origin=None) > >> im.set_data(x,y,z) > >> > >> ax.images.append(im) > >> ax.set_xlim(x[0],x[-1]) > >> ax.set_ylim(y[0],y[-1]) > >> > >> plt.colorbar(im) > >> > >> plt.gcf().canvas.draw() > >> > >> > >> After that, I try to change the color scale using: > >> > >> im.set_clim(0,0.5) > >> plt.gcf().canvas.draw() > >> > >> The colorbar changes scale, but the plot is untouched. Is that the expected behavior? > >> > >> Thanks, > >> Ray > > > > Try, perhaps, after set_clim, to reinstall the data: > > > > im.set_data(x,y,z) > > plt.gcf().canvas.draw() > > > > = > > > > Jerzy Karczmarczuk > > > > ------------------------------------------------------------------------------ > > 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 > > -- > Ray Osborn > Materials Science Division > Argonne National Laboratory > Argonne, IL 60439, USA > Phone: +1 (630) 252-9011 > Email: RO...@an... > > > > > ------------------------------------------------------------------------------ > 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 -- Ray Osborn Materials Science Division Argonne National Laboratory Argonne, IL 60439, USA Phone: +1 (630) 252-9011 Email: RO...@an... |
|
From: Jae-Joon L. <lee...@gm...> - 2012-02-19 10:37:19
|
As far as I can see, this is a bug of matplolib, although calling a set_data work around this. Can you open a bug report in our github repo? -JJ 2012. 2. 18. 오후 10:12에 "Ray Osborn" <RO...@an...>님이 작성: > You're exactly right. That does fix it. Unfortunately, it means I have to > refactor some of my code because the Pyside slot doesn't currently have > access to the original data, but that's not a huge deal. > > Thanks, > Ray > > On Feb 18, 2012, at 4:35 AM, Jerzy Karczmarczuk wrote: > > > Ray Osborn: > >> > >> OK - it turns out I can reproduce it in a simple ipython session using > ipython --pylab=qt. > >> > >> I set up an image plot as follows: > >> > >> import numpy as np > >> import matplotlib.pyplot as plt > >> from matplotlib.image import NonUniformImage > >> > >> x=y=np.linspace(0,2*np.pi,101) > >> X,Y=np.meshgrid(x,y) > >> z=sin(X)*sin(Y) > >> > >> ax=plt.gca() > >> extent = (x[0],x[-1],y[0],y[-1]) > >> im = NonUniformImage(ax, extent=extent, origin=None) > >> im.set_data(x,y,z) > >> > >> ax.images.append(im) > >> ax.set_xlim(x[0],x[-1]) > >> ax.set_ylim(y[0],y[-1]) > >> > >> plt.colorbar(im) > >> > >> plt.gcf().canvas.draw() > >> > >> > >> After that, I try to change the color scale using: > >> > >> im.set_clim(0,0.5) > >> plt.gcf().canvas.draw() > >> > >> The colorbar changes scale, but the plot is untouched. Is that the > expected behavior? > >> > >> Thanks, > >> Ray > > > > Try, perhaps, after set_clim, to reinstall the data: > > > > im.set_data(x,y,z) > > plt.gcf().canvas.draw() > > > > = > > > > Jerzy Karczmarczuk > > > > > ------------------------------------------------------------------------------ > > 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 > > -- > Ray Osborn > Materials Science Division > Argonne National Laboratory > Argonne, IL 60439, USA > Phone: +1 (630) 252-9011 > Email: RO...@an... > > > > > > ------------------------------------------------------------------------------ > 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: Eric F. <ef...@ha...> - 2012-02-19 00:07:41
|
On 02/18/2012 01:44 PM, fra...@hu... wrote:
> Hello all.
>
> I have a rather long code and get always a strange error:
>
> can't invoke "event" command: application has been destroyed
> while executing
> "event generate $w <<ThemeChanged>>"
> (procedure "ttk::ThemeChanged" line 6)
> invoked from within
> "ttk::ThemeChanged"
>
>
> The code is too long but I found some other code that produces exactly
> same type of error (see below).
>
> Does anybody have an idea what can be done in this case? Thx for
> some help.
>
> Frank.
>
> I use: Ubuntu 10.10, 64 bit, Tkinter, Python 2.6, etc ...
Confirmed with mpl master, ubuntu 11.04. It seems to be a harmless
glitch in Tk. It is triggered by making a figure and then closing it;
it does not matter whether anything is drawn in the figure. So the
example can be condensed even more to:
import matplotlib.pyplot as plt
fig1 = plt.figure()
plt.close(fig1)
fig2 = plt.figure()
plt.plot(range(10), 'bo')
plt.title('This figure will be shown')
plt.show()
Eric
>
> ***************************************************************
>
> import matplotlib.pyplot as plt
>
> fig1 = plt.figure()
> plt.plot(range(10), 'ro-')
> plt.title('This figure will be saved but not shown')
> fig1.savefig('fig1.png')
> plt.close(fig1)
>
> fig2 = plt.figure()
> plt.plot(range(10), 'bo')
> plt.title('This figure will be shown')
>
> 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: <fra...@hu...> - 2012-02-18 23:44:55
|
Hello all.
I have a rather long code and get always a strange error:
can't invoke "event" command: application has been destroyed
while executing
"event generate $w "
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
The code is too long but I found some other code that produces exactly
same type of error (see below).
Does anybody have an idea what can be done in this case? Thx for
some help.
Frank.
I use: Ubuntu 10.10, 64 bit, Tkinter, Python 2.6, etc ...
***************************************************************
import matplotlib.pyplot as plt
fig1 = plt.figure()
plt.plot(range(10), 'ro-')
plt.title('This figure will be saved but not shown')
fig1.savefig('fig1.png')
plt.close(fig1)
fig2 = plt.figure()
plt.plot(range(10), 'bo')
plt.title('This figure will be shown')
plt.show() |
|
From: Eric F. <ef...@ha...> - 2012-02-18 23:33:31
|
On 02/18/2012 01:14 PM, Michael Rawlins wrote: > > ------------------------------------------------------------------------ > *From:* Eric Firing <ef...@ha...> > *To:* Michael Rawlins <raw...@ya...> > *Cc:* "mat...@li..." > <mat...@li...> > *Sent:* Saturday, February 18, 2012 5:42 PM > *Subject:* Re: [Matplotlib-users] installed python-scipy causing errors > with numpy > > On 02/18/2012 11:54 AM, Michael Rawlins wrote: > > > > > > The version of numpy I installed last month from source is 1.61. I've > > just found a couple files: > > > > /usr/bin/numpy-1.6.1/doc/release/1.3.0-notes.rst > > This looks wrong. Did you untar the tarball in /usr/bin? Don't. Untar > it in some non-system location, maybe a subdirectory of your home > directory, and then > > cd numpy > python setup.py build > sudo python setup.py install > > > Thanks. Yes, I did untar numpy.tar in /usr/bin. Won't do that again. > When I installed matplotlib I untared that tarball in a subdirectory of > my home directory. > > Any suggestions for being sure I completely remove all potentially > conflicting traces of numpy and matplotlib before reinstall? I usually > use the locate command to find files with those names in them. As you > know, the files are most often found in just a few directories. > > Mike Mike, I think that using synaptic to uninstall what you installed with synaptic, together with manually removing the misplaced untarred tree, should take care of everything. locate is indeed very helpful, but don't forget that its database is updated at intervals, not continuously. Eric |
|
From: Michael R. <raw...@ya...> - 2012-02-18 23:15:00
|
________________________________ From: Eric Firing <ef...@ha...> To: Michael Rawlins <raw...@ya...> Cc: "mat...@li..." <mat...@li...> Sent: Saturday, February 18, 2012 5:42 PM Subject: Re: [Matplotlib-users] installed python-scipy causing errors with numpy On 02/18/2012 11:54 AM, Michael Rawlins wrote: > > > The version of numpy I installed last month from source is 1.61. I've > just found a couple files: > > /usr/bin/numpy-1.6.1/doc/release/1.3.0-notes.rst This looks wrong. Did you untar the tarball in /usr/bin? Don't. Untar it in some non-system location, maybe a subdirectory of your home directory, and then cd numpy python setup.py build sudo python setup.py install Thanks. Yes, I did untar numpy.tar in /usr/bin. Won't do that again. When I installed matplotlib I untared that tarball in a subdirectory of my home directory. Any suggestions for being sure I completely remove all potentially conflicting traces of numpy and matplotlib before reinstall? I usually use the locate command to find files with those names in them. As you know, the files are most often found in just a few directories. Mike |
|
From: Saurav P. <sa...@sa...> - 2012-02-18 23:10:50
|
I created an issue here: https://github.com/matplotlib/matplotlib/issues/707 On 02/18/2012 11:00 AM, Benjamin Root wrote: > > > On Saturday, February 18, 2012, Jerzy Karczmarczuk wrote: > > Saurav Pathak : > > I am trying to generate key press events in matplotlib (imshow) > embedded > > in pyqt4, but I am getting nowhere. > Yes, another victim... > > My small animation test program > > http://users.info.unicaen.fr/~karczma/TEACH/Test/isingVZ.py > <http://users.info.unicaen.fr/%7Ekarczma/TEACH/Test/isingVZ.py> > > run under Windows XP / Python 2.7, shows the following > > 1. For WX and GTK the timing doesn't work properly. > 2. For QT4 key event processing doesn't work > > Only Ye Olde Tkinter backend seems to behave decently. > Well, the animation in matplotlib - as I have already mentioned some > week ago - is really imperfect, and should be re-analysed (in > particular > not giving to the user the access to the event loop is a severe > handycap). Now I see that events in general need to be looked into in > details. I feel sorry that I have no time to dig more thoroughly. > (Of course, I may be doing some rubbish..., then mes plus plates > excuses). > > Jerzy Karczmarczuk > > > > Please file bug reports on these issues, as they are critical. > > Ben Root > > > ------------------------------------------------------------------------------ > 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: Eric F. <ef...@ha...> - 2012-02-18 22:42:40
|
On 02/18/2012 11:54 AM, Michael Rawlins wrote: > > > ------------------------------------------------------------------------ > *From:* Eric Firing <ef...@ha...> > *To:* Michael Rawlins <raw...@ya...> > *Cc:* "mat...@li..." > <mat...@li...> > *Sent:* Saturday, February 18, 2012 3:57 PM > *Subject:* Re: [Matplotlib-users] installed python-scipy causing errors > with numpy > > On 02/18/2012 10:49 AM, Michael Rawlins wrote: > > > > > > ------------------------------------------------------------------------ > > *From:* Eric Firing <ef...@ha... <mailto:ef...@ha...>> > > *To:* mat...@li... > <mailto:mat...@li...> > > *Sent:* Saturday, February 18, 2012 12:26 PM > > *Subject:* Re: [Matplotlib-users] installed python-scipy causing errors > > with numpy > > > > On 02/18/2012 07:17 AM, Michael Rawlins wrote: > > > > > > A couple weeks ago I installed version 1.2 from sources, as described > > here: > > > > > > http://matplotlib.sourceforge.net/users/installing.html > > > > > > I'm running Ubuntu 10.04 LTS. Everything was working fine. Looks like > > > numpy version 1.3 in place. A few minutes ago I installed python-scipy > > > from the Ubuntu Synaptic package manager. Getting this any time I run a > > > program: > > > > > > >python colorbar_testing.py <http://colorbar_testing.py> > <http://colorbar_testing.py> > > > Traceback (most recent call last): > > > File "colorbar_testing.py", line 5, in <module> > > > from matplotlib import pyplot, mpl > > > File "/usr/local/lib/python2.6/dist-packages/matplotlib/__init__.py", > > > line 173, in <module> > > > __version__numpy__, numpy.__version__)) > > > ImportError: numpy 1.4 or later is required; you have 1.3.0 > > > > > > > > > Version control with python, matplotlib, numpy, etc problematic when > > > compiled from source? Shall I reinstall everything again, including > > > python-scipy? What order? Thanks. > > > > You need to remove your numpy and scipy packages and install both of > > these from source (just use the most recent releases), and then rebuild > > matplotlib. Numpy has to be installed before building either scipy or > > mpl, but mpl and scipy are independent of each other so either can be > > built once a suitable numpy is there. > > > > Eric > > > > > > > > Thanks Eric. One things escapes me. Are scipy and python redundant? > > Should both be installed? > > > > I'd installed numpy and matplotlib from source. Working right now on > > locating and remove all traces of those programs before re-installing. > > Can python 2.6 that I installed through Synapic Package manager stay in > > place. Perhaps I should remove it too just to be sure everything works > > right? > > No! The python 2.6 package is perfectly fine. Try to remove that, and > you are likely to hose your whole system. It sounds like your only > problem was that you had the numpy package installed, and it was being > found instead of the one installed from source. > > Eric > > > I don't understand what you mean when you say "...you had the numpy > package installed,.." Are you saying a version of numpy came along with > scipy, and that was the one "being found"? Also, to run programs which No, scipy builds on numpy but does not include it. > need scipy.stats I'll have to again install scipy. When I did that using > Synaptic it broke my system. In summary, I don't understand what caused Installing the scipy package will pull in numpy as its dependency, so if you need a newer version of numpy, as you do for mpl, then you also need to remove any packages that depend on it and install them from source. > the problem. Shall I install scipy from source? Yes, after completely removing the numpy package and installing numpy from source. > > The version of numpy I installed last month from source is 1.61. I've > just found a couple files: > > /usr/bin/numpy-1.6.1/doc/release/1.3.0-notes.rst This looks wrong. Did you untar the tarball in /usr/bin? Don't. Untar it in some non-system location, maybe a subdirectory of your home directory, and then cd numpy python setup.py build sudo python setup.py install which should install in /usr/local/lib/python2.6/dist-packages. Same drill for scipy and matplotlib. The idea is that synaptic packages get installed in the /usr tree, and anything you install from source gets installed in the /usr/local tree, so they don't get mixed up. > /usr/lib/python2.6/dist-packages/numpy-1.3.0.egg-info. Not good. This is from the ubuntu package. > > I'll assume those numbers 1.3.0 are not an issue. I wouldn't assume that. Things seem rather scrambled up. Eric > > Mike > |
|
From: Michael R. <raw...@ya...> - 2012-02-18 21:54:41
|
________________________________ From: Eric Firing <ef...@ha...> To: Michael Rawlins <raw...@ya...> Cc: "mat...@li..." <mat...@li...> Sent: Saturday, February 18, 2012 3:57 PM Subject: Re: [Matplotlib-users] installed python-scipy causing errors with numpy On 02/18/2012 10:49 AM, Michael Rawlins wrote: > > > ------------------------------------------------------------------------ > *From:* Eric Firing <ef...@ha...> > *To:* mat...@li... > *Sent:* Saturday, February 18, 2012 12:26 PM > *Subject:* Re: [Matplotlib-users] installed python-scipy causing errors > with numpy > > On 02/18/2012 07:17 AM, Michael Rawlins wrote: > > > > A couple weeks ago I installed version 1.2 from sources, as described > here: > > > > http://matplotlib.sourceforge.net/users/installing.html > > > > I'm running Ubuntu 10.04 LTS. Everything was working fine. Looks like > > numpy version 1.3 in place. A few minutes ago I installed python-scipy > > from the Ubuntu Synaptic package manager. Getting this any time I run a > > program: > > > > >python colorbar_testing.py <http://colorbar_testing.py> > > Traceback (most recent call last): > > File "colorbar_testing.py", line 5, in <module> > > from matplotlib import pyplot, mpl > > File "/usr/local/lib/python2.6/dist-packages/matplotlib/__init__.py", > > line 173, in <module> > > __version__numpy__, numpy.__version__)) > > ImportError: numpy 1.4 or later is required; you have 1.3.0 > > > > > > Version control with python, matplotlib, numpy, etc problematic when > > compiled from source? Shall I reinstall everything again, including > > python-scipy? What order? Thanks. > > You need to remove your numpy and scipy packages and install both of > these from source (just use the most recent releases), and then rebuild > matplotlib. Numpy has to be installed before building either scipy or > mpl, but mpl and scipy are independent of each other so either can be > built once a suitable numpy is there. > > Eric > > > > Thanks Eric. One things escapes me. Are scipy and python redundant? > Should both be installed? > > I'd installed numpy and matplotlib from source. Working right now on > locating and remove all traces of those programs before re-installing. > Can python 2.6 that I installed through Synapic Package manager stay in > place. Perhaps I should remove it too just to be sure everything works > right? No! The python 2.6 package is perfectly fine. Try to remove that, and you are likely to hose your whole system. It sounds like your only problem was that you had the numpy package installed, and it was being found instead of the one installed from source. Eric I don't understand what you mean when you say "...you had the numpy package installed,.." Are you saying a version of numpy came along with scipy, and that was the one "being found"? Also, to run programs which need scipy.stats I'll have to again install scipy. When I did that using Synaptic it broke my system. In summary, I don't understand what caused the problem. Shall I install scipy from source? The version of numpy I installed last month from source is 1.61. I've just found a couple files: /usr/bin/numpy-1.6.1/doc/release/1.3.0-notes.rst /usr/lib/python2.6/dist-packages/numpy-1.3.0.egg-info. I'll assume those numbers 1.3.0 are not an issue. Mike |
|
From: Eric F. <ef...@ha...> - 2012-02-18 20:57:26
|
On 02/18/2012 10:49 AM, Michael Rawlins wrote: > > > ------------------------------------------------------------------------ > *From:* Eric Firing <ef...@ha...> > *To:* mat...@li... > *Sent:* Saturday, February 18, 2012 12:26 PM > *Subject:* Re: [Matplotlib-users] installed python-scipy causing errors > with numpy > > On 02/18/2012 07:17 AM, Michael Rawlins wrote: > > > > A couple weeks ago I installed version 1.2 from sources, as described > here: > > > > http://matplotlib.sourceforge.net/users/installing.html > > > > I'm running Ubuntu 10.04 LTS. Everything was working fine. Looks like > > numpy version 1.3 in place. A few minutes ago I installed python-scipy > > from the Ubuntu Synaptic package manager. Getting this any time I run a > > program: > > > > >python colorbar_testing.py <http://colorbar_testing.py> > > Traceback (most recent call last): > > File "colorbar_testing.py", line 5, in <module> > > from matplotlib import pyplot, mpl > > File "/usr/local/lib/python2.6/dist-packages/matplotlib/__init__.py", > > line 173, in <module> > > __version__numpy__, numpy.__version__)) > > ImportError: numpy 1.4 or later is required; you have 1.3.0 > > > > > > Version control with python, matplotlib, numpy, etc problematic when > > compiled from source? Shall I reinstall everything again, including > > python-scipy? What order? Thanks. > > You need to remove your numpy and scipy packages and install both of > these from source (just use the most recent releases), and then rebuild > matplotlib. Numpy has to be installed before building either scipy or > mpl, but mpl and scipy are independent of each other so either can be > built once a suitable numpy is there. > > Eric > > > > Thanks Eric. One things escapes me. Are scipy and python redundant? > Should both be installed? > > I'd installed numpy and matplotlib from source. Working right now on > locating and remove all traces of those programs before re-installing. > Can python 2.6 that I installed through Synapic Package manager stay in > place. Perhaps I should remove it too just to be sure everything works > right? No! The python 2.6 package is perfectly fine. Try to remove that, and you are likely to hose your whole system. It sounds like your only problem was that you had the numpy package installed, and it was being found instead of the one installed from source. Eric > > Mike > > |
|
From: Michael R. <raw...@ya...> - 2012-02-18 20:51:42
|
________________________________ From: Eric Firing <ef...@ha...> To: mat...@li... Sent: Saturday, February 18, 2012 12:26 PM Subject: Re: [Matplotlib-users] installed python-scipy causing errors with numpy On 02/18/2012 07:17 AM, Michael Rawlins wrote: > > A couple weeks ago I installed version 1.2 from sources, as described here: > > http://matplotlib.sourceforge.net/users/installing.html > > I'm running Ubuntu 10.04 LTS. Everything was working fine. Looks like > numpy version 1.3 in place. A few minutes ago I installed python-scipy > from the Ubuntu Synaptic package manager. Getting this any time I run a > program: > > >python colorbar_testing.py > Traceback (most recent call last): > File "colorbar_testing.py", line 5, in <module> > from matplotlib import pyplot, mpl > File "/usr/local/lib/python2.6/dist-packages/matplotlib/__init__.py", > line 173, in <module> > __version__numpy__, numpy.__version__)) > ImportError: numpy 1.4 or later is required; you have 1.3.0 > > > Version control with python, matplotlib, numpy, etc problematic when > compiled from source? Shall I reinstall everything again, including > python-scipy? What order? Thanks. You need to remove your numpy and scipy packages and install both of these from source (just use the most recent releases), and then rebuild matplotlib. Numpy has to be installed before building either scipy or mpl, but mpl and scipy are independent of each other so either can be built once a suitable numpy is there. Eric Thanks Eric. One things escapes me. Are scipy and python redundant? Should both be installed? I'd installed numpy and matplotlib from source. Working right now on locating and remove all traces of those programs before re-installing. Can python 2.6 that I installed through Synapic Package manager stay in place. Perhaps I should remove it too just to be sure everything works right? Mike |
|
From: Benjamin R. <ben...@ou...> - 2012-02-18 19:32:26
|
On Saturday, February 18, 2012, Tony Yu wrote:
>
>
> On Tue, Feb 14, 2012 at 12:49 PM, Olе Streicher <ole...@gm...<javascript:_e({}, 'cvml', 'ole...@gm...');>
> > wrote:
>
>> Jerzy Karczmarczuk
>> <jer...@un... <javascript:_e({}, 'cvml',
>> 'jer...@un...');>> writes:
>> > Could you provide a /working/ example with the geometry you really want?
>> > I believe I thought more or less about it as Tony Yu did. If it is
>> > wrong, be more precise, please.
>>
>> I have a data set that looks like this:
>>
>> mydata = numpy.copy([
>>
>> # lambda, data
>>
>> # First data row
>> [[5002., 0.5],
>> [5200., 0.34],
>> [5251., -1.2],
>> # ...
>> [8997., 2.4]],
>>
>> # second data row
>> [[5002., 0.72],
>> [5251., 0.9],
>> # ...
>> [8997., 0.1]],
>>
>> # other data rows to follow
>> # ...
>> ])
>>
>> where I want to put the first column (lambda) on the Y axis, which each
>> data row as one colorbar (like in your code), and the data as the color
>> of that data point -- interpolated vertically.
>>
>> Best regards
>>
>> Ole
>>
>>
> OK, I see now.
>
> Unfortunately, this makes it quite a bit more complex, but it's still
> doable. Part of the complexity arises because of (what I believe to be) a
> quirk in NonUniformImage: You can pass an extent argument, but this only
> rescales the data---it doesn't clip the data. You have to manually clip the
> borders of each bar.
>
> Here's an example:
>
> #---
> import numpy as np
> import matplotlib.pyplot as plt
> from matplotlib.image import NonUniformImage
>
> width = 0.5
> height = 10
>
> ax = plt.gca()
>
> for x0 in np.arange(11):
> y = np.sort(np.random.uniform(high=height, size=10))
> z = np.random.random(size=(10, 1))
> # Note NonUniformImage fails with single column; double up data
> z = np.repeat(z, 2, axis=1)
> x = [x0, x0]
>
> extent = (x0-width/2., x0+width/2, y[0], y[-1])
> im = NonUniformImage(ax, interpolation='bilinear', extent=extent)
> im.set_data(x, y, z)
>
> # clip image
> x_left = extent[0]
> xm = [x_left, x_left + width, x_left + width, x_left]
> ym = [0, 0, height, height]
> mask, = ax.fill(xm, ym, facecolor='none', edgecolor='none')
> im.set_clip_path(mask)
>
> ax.images.append(im)
>
> ax.set_xlim(-width, x0+width)
>
> plt.show()
> #---
>
> HTH,
> -Tony
>
Not a quirk. Extent is used to define a domain for the passed in data. If
none is given, one is assumed from the input data. If you want clipping,
either set x and y limits or pass in a slice of the data.
Ben Root
|