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
(19) |
2
(30) |
3
(14) |
4
(1) |
|
5
(16) |
6
(7) |
7
(12) |
8
(14) |
9
(35) |
10
(16) |
11
(31) |
|
12
(6) |
13
(14) |
14
(13) |
15
(20) |
16
(15) |
17
(27) |
18
(5) |
|
19
(10) |
20
(22) |
21
(20) |
22
(30) |
23
(25) |
24
(11) |
25
(2) |
|
26
(2) |
27
(23) |
28
(20) |
29
(26) |
30
(25) |
31
(7) |
|
|
From: Sebastian B. <web...@th...> - 2009-07-05 21:26:33
|
>>>>> Pau wrote:
>>>>>> ...
>>>>>> MODE: 0.00e+00 - 1.00e-04
>>>>>>
>>>>>> (2226):**********************************************************************************************
>>>>>> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
>>>>>> 2: 2.00e-04 - 3.00e-04 ( 273):************
>>>>>> 3: 3.00e-04 - 4.00e-04 ( 173):********
>>>>>> 4: 4.00e-04 - 5.00e-04 ( 125):******
>>>>>> 5: 5.00e-04 - 6.00e-04 ( 99):*****
>>>>>> 6: 6.00e-04 - 7.00e-04 ( 68):***
>>>>>> ...
i think it was the last (empty) line which was messing up things. the
following works (at least here.....)
from scipy import *
from matplotlib.pyplot import *
from string import split
f = open("histo2.dat")
data = f.readlines()
f.close()
x, y, dy = [], [], []
for i, line in enumerate(data):
try:
y.append(int(line.split('(')[1].split(')')[0]))
x.append(i)
dy.append(sqrt(y[-1]))
except:
pass
bar(x, y, yerr=dy, align='center')
show()
main difference is swapping of x and y append(......): if something goes
wrong width y, it won't do x and therefore both will have the same
length in the end (i think it was complaining about the two not having
the same length).
as a side note:
you might want to use
yscale('log')
and / or
xscale('log')
as your data drop pretty fast.
good luck & good night,
sebastian.
|
|
From: Valentin F. <flu...@gm...> - 2009-07-05 21:07:42
|
> Is there some way to prevent this or alternatively set the > properties after manually setting the labels? Hi, I just found out how to restore the old settings: save = pl.rcParams.copy() pl.clabel(cs, manual=True) pl.rcParams.update(save) Maybe this should be the default behaviour? Regards, Valentin |
|
From: Sebastian B. <web...@th...> - 2009-07-05 21:02:15
|
Pau wrote:
> ...
> 2009/7/5 Gökhan SEVER <gok...@gm...>:
>> On Sun, Jul 5, 2009 at 3:41 PM, Pau <vim...@go...> wrote:
>>> ...
>>> Traceback (most recent call last):
>>> File "./prova.py", line 14, in <module>
>>> y.append(int(line.split('(')[1].split(')')[0]))
>>> IndexError: list index out of range
>>>> 2009/7/5 Sebastian Busch <web...@th...>:
>>>>> Pau wrote:
>>>>>> (2226):**********************************************************************************************
>>>>>> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
hey there,
what the line should do is to get the number out of the lengthy text. it
should take what is behind a "(" and before a ")". my guess is that in
some line of your textfile, there is no bracket. give this a try:
from scipy import *
from matplotlib.pyplot import *
from string import split
f = open("histo.dat")
data = f.readlines()
f.close()
x, y, dy = [], [], []
for i, line in enumerate(data):
try:
x.append(i)
y.append(int(line.split('(')[1].split(')')[0]))
dy.append(sqrt(y[-1]))
except:
pass
bar(x, y, yerr=dy, align='center')
show()
which will skip any error. but check if your data made it into "y" or
were skipped as well! ;)
best,
sebastian.
|
|
From: Gökhan S. <gok...@gm...> - 2009-07-05 20:58:18
|
OK, You are one step closer to point out the error.
Look for an instance of line. What does it output?
Then try fiddling with the split() function and proper indexes.
Haha, are you a Mediterranean person or what?
On Sun, Jul 5, 2009 at 3:54 PM, Pau <vim...@go...> wrote:
> Hello,
>
> thanks, yes, I had done this already. It's pointing to the append
> place for y, but I am absolutely lost at that line. I don't understand
> it.
>
> I guess this has to do with the format of the data (see previous e-mail)
>
> ---> 13 y.append(int(line.split('(')[1].split(')')[0]))
>
> anyway... thanks for all... I guess that the last minute panic is not
> exactly the best strategy, as usual
>
> Pau
>
> 2009/7/5 Gökhan SEVER <gok...@gm...>:
> > On Sun, Jul 5, 2009 at 3:41 PM, Pau <vim...@go...> wrote:
> >>
> >> ok, I installed now scipy
> >>
> >> Traceback (most recent call last):
> >> File "./prova.py", line 14, in <module>
> >> y.append(int(line.split('(')[1].split(')')[0]))
> >> IndexError: list index out of range
> >>
> >> what is out of range?
> >>
> >> sorry for the spamming... :(
> >>
> >> 2009/7/5 Pau <vim...@go...>:
> >> > Hello!
> >> >
> >> > thanks for the quick answer!
> >> >
> >> > I have removed the text lines (do you mean the ones starting with a
> >> > hash, #? I removed those)
> >> >
> >> > It complained about
> >> >
> >> > from scipy import * # complained "ImportError: No module named scipy"
> >> >
> >> > So I commented it out and added
> >> >
> >> > from pylab import *
> >> >
> >> > But it's crashing:
> >> >
> >> > Traceback (most recent call last):
> >> > File "./prova.py", line 14, in <module>
> >> > y.append(int(line.split('(')[1].split(')')[0]))
> >> > IndexError: list index out of range
> >> >
> >> > where
> >> >
> >> > hux(p2)| cat prova.py
> >> > #!/usr/bin/env python
> >> > from pylab import *
> >> > #from scipy import * # complained "ImportError: No module named scipy"
> >> > from matplotlib.pyplot import *
> >> > from string import split
> >> >
> >> > f = open("histo2.dat")
> >> > data = f.readlines()
> >> > f.close()
> >> >
> >> > x, y, dy = [], [], []
> >> > for i, line in enumerate(data):
> >> > x.append(i)
> >> > y.append(int(line.split('(')[1].split(')')[0]))
> >> > dy.append(sqrt(y[-1]))
> >> >
> >> > bar(x, y, yerr=dy, align='center')
> >> > show()
> >> >
> >> > It would be great if I got this one done. Thanks for your help
> >> >
> >> >
> >> > Pau
> >> >
> >> >
> >> > 2009/7/5 Sebastian Busch <web...@th...>:
> >> >> Pau wrote:
> >> >>> ...
> >> >>> MODE: 0.00e+00 - 1.00e-04
> >> >>>
> >> >>>
> (2226):**********************************************************************************************
> >> >>> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
> >> >>> 2: 2.00e-04 - 3.00e-04 ( 273):************
> >> >>> 3: 3.00e-04 - 4.00e-04 ( 173):********
> >> >>> 4: 4.00e-04 - 5.00e-04 ( 125):******
> >> >>> 5: 5.00e-04 - 6.00e-04 ( 99):*****
> >> >>> 6: 6.00e-04 - 7.00e-04 ( 68):***
> >> >>> ...
> >> >>> I am supposed to show this plot tomorrow and I cannot figure out how
> >> >>> to plot this with matplotlib
> >> >>> ...
> >> >>
> >> >> hey!
> >> >>
> >> >> i'm not sure but maybe you are looking for something like this (will
> >> >> crash on the text lines in the file -- you may want to add a try:...
> >> >> except: pass around the split thing.
> >> >>
> >> >>
> >> >>
> >> >> from scipy import *
> >> >> from matplotlib.pyplot import *
> >> >> from string import split
> >> >>
> >> >> f = open("histo.dat")
> >> >> data = f.readlines()
> >> >> f.close()
> >> >>
> >> >> x, y, dy = [], [], []
> >> >> for i, line in enumerate(data):
> >> >> x.append(i)
> >> >> y.append(int(line.split('(')[1].split(')')[0]))
> >> >> dy.append(sqrt(y[-1]))
> >> >>
> >> >> bar(x, y, yerr=dy, align='center')
> >> >> show()
> >> >>
> >> >>
> >> >> good luck,
> >> >> sebastian.
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Let there be peace on earth. And let it begin with misc
> >> >
> >>
> >>
> >>
> >> --
> >> Let there be peace on earth. And let it begin with misc
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> _______________________________________________
> >> Matplotlib-users mailing list
> >> Mat...@li...
> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> > Pau,
> >
> > I recommend you to run this script via ipython.
> >
> > First install it if you haven't and and run your script with %run magic
> > command. There you will be able to easily pinpoint the index out of range
> > error.
> >
> > --
> > Gökhan
> >
>
>
>
> --
> Let there be peace on earth. And let it begin with misc
>
--
Gökhan
|
|
From: Pau <vim...@go...> - 2009-07-05 20:54:49
|
Hello,
thanks, yes, I had done this already. It's pointing to the append
place for y, but I am absolutely lost at that line. I don't understand
it.
I guess this has to do with the format of the data (see previous e-mail)
---> 13 y.append(int(line.split('(')[1].split(')')[0]))
anyway... thanks for all... I guess that the last minute panic is not
exactly the best strategy, as usual
Pau
2009/7/5 Gökhan SEVER <gok...@gm...>:
> On Sun, Jul 5, 2009 at 3:41 PM, Pau <vim...@go...> wrote:
>>
>> ok, I installed now scipy
>>
>> Traceback (most recent call last):
>> File "./prova.py", line 14, in <module>
>> y.append(int(line.split('(')[1].split(')')[0]))
>> IndexError: list index out of range
>>
>> what is out of range?
>>
>> sorry for the spamming... :(
>>
>> 2009/7/5 Pau <vim...@go...>:
>> > Hello!
>> >
>> > thanks for the quick answer!
>> >
>> > I have removed the text lines (do you mean the ones starting with a
>> > hash, #? I removed those)
>> >
>> > It complained about
>> >
>> > from scipy import * # complained "ImportError: No module named scipy"
>> >
>> > So I commented it out and added
>> >
>> > from pylab import *
>> >
>> > But it's crashing:
>> >
>> > Traceback (most recent call last):
>> > File "./prova.py", line 14, in <module>
>> > y.append(int(line.split('(')[1].split(')')[0]))
>> > IndexError: list index out of range
>> >
>> > where
>> >
>> > hux(p2)| cat prova.py
>> > #!/usr/bin/env python
>> > from pylab import *
>> > #from scipy import * # complained "ImportError: No module named scipy"
>> > from matplotlib.pyplot import *
>> > from string import split
>> >
>> > f = open("histo2.dat")
>> > data = f.readlines()
>> > f.close()
>> >
>> > x, y, dy = [], [], []
>> > for i, line in enumerate(data):
>> > x.append(i)
>> > y.append(int(line.split('(')[1].split(')')[0]))
>> > dy.append(sqrt(y[-1]))
>> >
>> > bar(x, y, yerr=dy, align='center')
>> > show()
>> >
>> > It would be great if I got this one done. Thanks for your help
>> >
>> >
>> > Pau
>> >
>> >
>> > 2009/7/5 Sebastian Busch <web...@th...>:
>> >> Pau wrote:
>> >>> ...
>> >>> MODE: 0.00e+00 - 1.00e-04
>> >>>
>> >>> (2226):**********************************************************************************************
>> >>> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
>> >>> 2: 2.00e-04 - 3.00e-04 ( 273):************
>> >>> 3: 3.00e-04 - 4.00e-04 ( 173):********
>> >>> 4: 4.00e-04 - 5.00e-04 ( 125):******
>> >>> 5: 5.00e-04 - 6.00e-04 ( 99):*****
>> >>> 6: 6.00e-04 - 7.00e-04 ( 68):***
>> >>> ...
>> >>> I am supposed to show this plot tomorrow and I cannot figure out how
>> >>> to plot this with matplotlib
>> >>> ...
>> >>
>> >> hey!
>> >>
>> >> i'm not sure but maybe you are looking for something like this (will
>> >> crash on the text lines in the file -- you may want to add a try:...
>> >> except: pass around the split thing.
>> >>
>> >>
>> >>
>> >> from scipy import *
>> >> from matplotlib.pyplot import *
>> >> from string import split
>> >>
>> >> f = open("histo.dat")
>> >> data = f.readlines()
>> >> f.close()
>> >>
>> >> x, y, dy = [], [], []
>> >> for i, line in enumerate(data):
>> >> x.append(i)
>> >> y.append(int(line.split('(')[1].split(')')[0]))
>> >> dy.append(sqrt(y[-1]))
>> >>
>> >> bar(x, y, yerr=dy, align='center')
>> >> show()
>> >>
>> >>
>> >> good luck,
>> >> sebastian.
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Let there be peace on earth. And let it begin with misc
>> >
>>
>>
>>
>> --
>> Let there be peace on earth. And let it begin with misc
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> Pau,
>
> I recommend you to run this script via ipython.
>
> First install it if you haven't and and run your script with %run magic
> command. There you will be able to easily pinpoint the index out of range
> error.
>
> --
> Gökhan
>
--
Let there be peace on earth. And let it begin with misc
|
|
From: Gökhan S. <gok...@gm...> - 2009-07-05 20:48:09
|
On Sun, Jul 5, 2009 at 3:41 PM, Pau <vim...@go...> wrote:
> ok, I installed now scipy
>
> Traceback (most recent call last):
> File "./prova.py", line 14, in <module>
> y.append(int(line.split('(')[1].split(')')[0]))
> IndexError: list index out of range
>
> what is out of range?
>
> sorry for the spamming... :(
>
> 2009/7/5 Pau <vim...@go...>:
> > Hello!
> >
> > thanks for the quick answer!
> >
> > I have removed the text lines (do you mean the ones starting with a
> > hash, #? I removed those)
> >
> > It complained about
> >
> > from scipy import * # complained "ImportError: No module named scipy"
> >
> > So I commented it out and added
> >
> > from pylab import *
> >
> > But it's crashing:
> >
> > Traceback (most recent call last):
> > File "./prova.py", line 14, in <module>
> > y.append(int(line.split('(')[1].split(')')[0]))
> > IndexError: list index out of range
> >
> > where
> >
> > hux(p2)| cat prova.py
> > #!/usr/bin/env python
> > from pylab import *
> > #from scipy import * # complained "ImportError: No module named scipy"
> > from matplotlib.pyplot import *
> > from string import split
> >
> > f = open("histo2.dat")
> > data = f.readlines()
> > f.close()
> >
> > x, y, dy = [], [], []
> > for i, line in enumerate(data):
> > x.append(i)
> > y.append(int(line.split('(')[1].split(')')[0]))
> > dy.append(sqrt(y[-1]))
> >
> > bar(x, y, yerr=dy, align='center')
> > show()
> >
> > It would be great if I got this one done. Thanks for your help
> >
> >
> > Pau
> >
> >
> > 2009/7/5 Sebastian Busch <web...@th...>:
> >> Pau wrote:
> >>> ...
> >>> MODE: 0.00e+00 - 1.00e-04
> >>>
> (2226):**********************************************************************************************
> >>> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
> >>> 2: 2.00e-04 - 3.00e-04 ( 273):************
> >>> 3: 3.00e-04 - 4.00e-04 ( 173):********
> >>> 4: 4.00e-04 - 5.00e-04 ( 125):******
> >>> 5: 5.00e-04 - 6.00e-04 ( 99):*****
> >>> 6: 6.00e-04 - 7.00e-04 ( 68):***
> >>> ...
> >>> I am supposed to show this plot tomorrow and I cannot figure out how
> >>> to plot this with matplotlib
> >>> ...
> >>
> >> hey!
> >>
> >> i'm not sure but maybe you are looking for something like this (will
> >> crash on the text lines in the file -- you may want to add a try:...
> >> except: pass around the split thing.
> >>
> >>
> >>
> >> from scipy import *
> >> from matplotlib.pyplot import *
> >> from string import split
> >>
> >> f = open("histo.dat")
> >> data = f.readlines()
> >> f.close()
> >>
> >> x, y, dy = [], [], []
> >> for i, line in enumerate(data):
> >> x.append(i)
> >> y.append(int(line.split('(')[1].split(')')[0]))
> >> dy.append(sqrt(y[-1]))
> >>
> >> bar(x, y, yerr=dy, align='center')
> >> show()
> >>
> >>
> >> good luck,
> >> sebastian.
> >>
> >>
> >
> >
> >
> > --
> > Let there be peace on earth. And let it begin with misc
> >
>
>
>
> --
> Let there be peace on earth. And let it begin with misc
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
Pau,
I recommend you to run this script via ipython.
First install it if you haven't and and run your script with %run magic
command. There you will be able to easily pinpoint the index out of range
error.
--
Gökhan
|
|
From: Pau <vim...@go...> - 2009-07-05 20:41:35
|
ok, I installed now scipy
Traceback (most recent call last):
File "./prova.py", line 14, in <module>
y.append(int(line.split('(')[1].split(')')[0]))
IndexError: list index out of range
what is out of range?
sorry for the spamming... :(
2009/7/5 Pau <vim...@go...>:
> Hello!
>
> thanks for the quick answer!
>
> I have removed the text lines (do you mean the ones starting with a
> hash, #? I removed those)
>
> It complained about
>
> from scipy import * # complained "ImportError: No module named scipy"
>
> So I commented it out and added
>
> from pylab import *
>
> But it's crashing:
>
> Traceback (most recent call last):
> File "./prova.py", line 14, in <module>
> y.append(int(line.split('(')[1].split(')')[0]))
> IndexError: list index out of range
>
> where
>
> hux(p2)| cat prova.py
> #!/usr/bin/env python
> from pylab import *
> #from scipy import * # complained "ImportError: No module named scipy"
> from matplotlib.pyplot import *
> from string import split
>
> f = open("histo2.dat")
> data = f.readlines()
> f.close()
>
> x, y, dy = [], [], []
> for i, line in enumerate(data):
> x.append(i)
> y.append(int(line.split('(')[1].split(')')[0]))
> dy.append(sqrt(y[-1]))
>
> bar(x, y, yerr=dy, align='center')
> show()
>
> It would be great if I got this one done. Thanks for your help
>
>
> Pau
>
>
> 2009/7/5 Sebastian Busch <web...@th...>:
>> Pau wrote:
>>> ...
>>> MODE: 0.00e+00 - 1.00e-04
>>> (2226):**********************************************************************************************
>>> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
>>> 2: 2.00e-04 - 3.00e-04 ( 273):************
>>> 3: 3.00e-04 - 4.00e-04 ( 173):********
>>> 4: 4.00e-04 - 5.00e-04 ( 125):******
>>> 5: 5.00e-04 - 6.00e-04 ( 99):*****
>>> 6: 6.00e-04 - 7.00e-04 ( 68):***
>>> ...
>>> I am supposed to show this plot tomorrow and I cannot figure out how
>>> to plot this with matplotlib
>>> ...
>>
>> hey!
>>
>> i'm not sure but maybe you are looking for something like this (will
>> crash on the text lines in the file -- you may want to add a try:...
>> except: pass around the split thing.
>>
>>
>>
>> from scipy import *
>> from matplotlib.pyplot import *
>> from string import split
>>
>> f = open("histo.dat")
>> data = f.readlines()
>> f.close()
>>
>> x, y, dy = [], [], []
>> for i, line in enumerate(data):
>> x.append(i)
>> y.append(int(line.split('(')[1].split(')')[0]))
>> dy.append(sqrt(y[-1]))
>>
>> bar(x, y, yerr=dy, align='center')
>> show()
>>
>>
>> good luck,
>> sebastian.
>>
>>
>
>
>
> --
> Let there be peace on earth. And let it begin with misc
>
--
Let there be peace on earth. And let it begin with misc
|
|
From: Pau <vim...@go...> - 2009-07-05 20:02:36
|
Hello!
thanks for the quick answer!
I have removed the text lines (do you mean the ones starting with a
hash, #? I removed those)
It complained about
from scipy import * # complained "ImportError: No module named scipy"
So I commented it out and added
from pylab import *
But it's crashing:
Traceback (most recent call last):
File "./prova.py", line 14, in <module>
y.append(int(line.split('(')[1].split(')')[0]))
IndexError: list index out of range
where
hux(p2)| cat prova.py
#!/usr/bin/env python
from pylab import *
#from scipy import * # complained "ImportError: No module named scipy"
from matplotlib.pyplot import *
from string import split
f = open("histo2.dat")
data = f.readlines()
f.close()
x, y, dy = [], [], []
for i, line in enumerate(data):
x.append(i)
y.append(int(line.split('(')[1].split(')')[0]))
dy.append(sqrt(y[-1]))
bar(x, y, yerr=dy, align='center')
show()
It would be great if I got this one done. Thanks for your help
Pau
2009/7/5 Sebastian Busch <web...@th...>:
> Pau wrote:
>> ...
>> MODE: 0.00e+00 - 1.00e-04
>> (2226):**********************************************************************************************
>> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
>> 2: 2.00e-04 - 3.00e-04 ( 273):************
>> 3: 3.00e-04 - 4.00e-04 ( 173):********
>> 4: 4.00e-04 - 5.00e-04 ( 125):******
>> 5: 5.00e-04 - 6.00e-04 ( 99):*****
>> 6: 6.00e-04 - 7.00e-04 ( 68):***
>> ...
>> I am supposed to show this plot tomorrow and I cannot figure out how
>> to plot this with matplotlib
>> ...
>
> hey!
>
> i'm not sure but maybe you are looking for something like this (will
> crash on the text lines in the file -- you may want to add a try:...
> except: pass around the split thing.
>
>
>
> from scipy import *
> from matplotlib.pyplot import *
> from string import split
>
> f = open("histo.dat")
> data = f.readlines()
> f.close()
>
> x, y, dy = [], [], []
> for i, line in enumerate(data):
> x.append(i)
> y.append(int(line.split('(')[1].split(')')[0]))
> dy.append(sqrt(y[-1]))
>
> bar(x, y, yerr=dy, align='center')
> show()
>
>
> good luck,
> sebastian.
>
>
--
Let there be peace on earth. And let it begin with misc
|
|
From: Sebastian B. <web...@th...> - 2009-07-05 19:33:40
|
Pau wrote:
> ...
> MODE: 0.00e+00 - 1.00e-04
> (2226):**********************************************************************************************
> 1: 1.00e-04 - 2.00e-04 ( 482):*********************
> 2: 2.00e-04 - 3.00e-04 ( 273):************
> 3: 3.00e-04 - 4.00e-04 ( 173):********
> 4: 4.00e-04 - 5.00e-04 ( 125):******
> 5: 5.00e-04 - 6.00e-04 ( 99):*****
> 6: 6.00e-04 - 7.00e-04 ( 68):***
> ...
> I am supposed to show this plot tomorrow and I cannot figure out how
> to plot this with matplotlib
> ...
hey!
i'm not sure but maybe you are looking for something like this (will
crash on the text lines in the file -- you may want to add a try:...
except: pass around the split thing.
from scipy import *
from matplotlib.pyplot import *
from string import split
f = open("histo.dat")
data = f.readlines()
f.close()
x, y, dy = [], [], []
for i, line in enumerate(data):
x.append(i)
y.append(int(line.split('(')[1].split(')')[0]))
dy.append(sqrt(y[-1]))
bar(x, y, yerr=dy, align='center')
show()
good luck,
sebastian.
|
|
From: Pau <vim...@go...> - 2009-07-05 19:09:19
|
Hello, I am trying to make a histogram with matplotlib and I do not understand the example I found http://n2.nabble.com/Python-MatPlotLib-histogram-example-td1922503.html I have a data file called "histo.dat" which looks like --------------------------------------------- # # Eccentricity on entrance to detector band (finer grain) # MODE: 0.00e+00 - 1.00e-04 (2226):********************************************************************************************** 1: 1.00e-04 - 2.00e-04 ( 482):********************* 2: 2.00e-04 - 3.00e-04 ( 273):************ 3: 3.00e-04 - 4.00e-04 ( 173):******** 4: 4.00e-04 - 5.00e-04 ( 125):****** 5: 5.00e-04 - 6.00e-04 ( 99):***** 6: 6.00e-04 - 7.00e-04 ( 68):*** . . . 932: 9.32e-02 - 9.33e-02 ( 0): 933: 9.33e-02 - 9.34e-02 ( 1):* --------------------------------------------- The * were meant to give an ascii impression of the histogram. As you can see, I have 933 bins First bin (MODE, since it's the most frequent one) ranges between 0.00e+00 - 1.00e-04 and has 2226 occurrences Second bin ranges between 1.00e-04 - 2.00e-04 and has 482 occurrences Third bin between 3.00e-04 - 4.00e-04 with 273 cases etc etc I am supposed to show this plot tomorrow and I cannot figure out how to plot this with matplotlib Any help in this desperate last minute panic would be enormously appreciated! thanks Pau |
|
From: Jeff W. <js...@fa...> - 2009-07-05 13:27:29
|
Rick Muller wrote: > Having one last problem with matplotlib. I have some data that I'm > interpolating with griddata, and then plotting with contourf. For > reasons that escape me, the upper right and the lower left squares are > not being plotted. I'm printing out a 10x10 version of this to > exaggerate the effect: > > http://files.getdropbox.com/u/533499/griddata-example-text.png Rick: That URL doesn't work. griddata won't do extrapolation, that is it won't interpolate outside the convex hull of the data. That's probably why you see those empty squares at the edges. -Jeff > > In reality, I interpolate/plot this 200x200 squares, and none of it is > all that noticeable. However, I'm worried that I'm doing something > wrong here, and that the mistake is going to come back and bite me > later on. Has anyone seen anything like this? > > Thanks for any help you can offer with this, and thank for all of the > help the list members have already given me. > > Rick > -- > Rick Muller > rpm...@gm... <mailto:rpm...@gm...> > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Sandro T. <mat...@gm...> - 2009-07-05 13:08:31
|
Hello Rick, On Sun, Jul 5, 2009 at 03:52, Rick Muller<rpm...@gm...> wrote: > Having one last problem with matplotlib. I have some data that I'm > interpolating with griddata, and then plotting with contourf. For reasons > that escape me, the upper right and the lower left squares are not being > plotted. I'm printing out a 10x10 version of this to exaggerate the effect: > > http://files.getdropbox.com/u/533499/griddata-example-text.png this link returns a 404. Please attach the image to this email, along with a minimal program to replicate the problem (if possible). Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi |
|
From: s.s C <rot...@gm...> - 2009-07-05 07:44:45
|
when i ploted column data from an ASCII space delimited file :
import matplotlib.pyplot as plt
plt.plotfile('data.txt',cols=(0,1), delimiter=' ')
the shell throwed this message:
Traceback (most recent call last):
File "E:\python\PyCode\mycod\plot.py", line 3, in <module>
plt.plotfile('data.txt',cols=(0,1), delimiter=' ')
File "G:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 1213, in plotfile
skiprows=skiprows, checkrows=checkrows, delimiter=delimiter)
File "G:\Python25\Lib\site-packages\matplotlib\mlab.py", line 2413, in csv2rec
r = np.rec.fromrecords(rows, names=names)
File "G:\Python25\Lib\site-packages\numpy\core\records.py", line 566, in fromrecords
titles=titles, aligned=aligned, byteorder=byteorder)
File "G:\Python25\Lib\site-packages\numpy\core\records.py", line 480, in fromarrays
shape = arrayList[0].shape
IndexError: list index out of range
i try to google the problem ,but not useful.
please help me
the file is like this:
1 1.3 -4.05559696865 -4.09974234722 -13.5352323201 -13.3915384615
2 1.6 -7.12113939205 -7.1840871019 -7.36774833801 -7.32
3 1.9 -8.47624597145 -8.54549326814 -1.80919105829 -1.80157894737
4 2.2 -8.20665402703 -8.27497664874 3.62170535847 3.61090909091
5 2.5 -6.30322275637 -6.36597756498 9.16959519076 9.15
6 2.8 -2.70489691257 -2.75886601235 14.9723303533 14.9485714286
7 3.1 2.68017545558 2.63734932421 21.113614709 21.0880645161
8 3.4 9.96327191283 9.93338964107 27.6472562954 27.6211764706
9 3.7 19.2685292328 19.2530123284 34.6094390338 34.5835135135
|
|
From: s.s C <rot...@gm...> - 2009-07-05 07:43:31
|
when i ploted column data from an ASCII space delimited file :
import matplotlib.pyplot as plt
plt.plotfile('data.txt',cols=(0,1), delimiter=' ')
the shell throwed this message:
Traceback (most recent call last):
File "E:\python\PyCode\mycod\plot.py", line 3, in <module>
plt.plotfile('data.txt',cols=(0,1), delimiter=' ')
File "G:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 1213, in plotfile
skiprows=skiprows, checkrows=checkrows, delimiter=delimiter)
File "G:\Python25\Lib\site-packages\matplotlib\mlab.py", line 2413, in csv2rec
r = np.rec.fromrecords(rows, names=names)
File "G:\Python25\Lib\site-packages\numpy\core\records.py", line 566, in fromrecords
titles=titles, aligned=aligned, byteorder=byteorder)
File "G:\Python25\Lib\site-packages\numpy\core\records.py", line 480, in fromarrays
shape = arrayList[0].shape
IndexError: list index out of range
i try to google the problem ,but not useful.
please help me
the file is like this:
1 1.3 -4.05559696865 -4.09974234722 -13.5352323201 -13.3915384615
2 1.6 -7.12113939205 -7.1840871019 -7.36774833801 -7.32
3 1.9 -8.47624597145 -8.54549326814 -1.80919105829 -1.80157894737
4 2.2 -8.20665402703 -8.27497664874 3.62170535847 3.61090909091
5 2.5 -6.30322275637 -6.36597756498 9.16959519076 9.15
6 2.8 -2.70489691257 -2.75886601235 14.9723303533 14.9485714286
7 3.1 2.68017545558 2.63734932421 21.113614709 21.0880645161
8 3.4 9.96327191283 9.93338964107 27.6472562954 27.6211764706
9 3.7 19.2685292328 19.2530123284 34.6094390338 34.5835135135
|
|
From: Rick M. <rpm...@gm...> - 2009-07-05 02:22:39
|
Having one last problem with matplotlib. I have some data that I'm interpolating with griddata, and then plotting with contourf. For reasons that escape me, the upper right and the lower left squares are not being plotted. I'm printing out a 10x10 version of this to exaggerate the effect: http://files.getdropbox.com/u/533499/griddata-example-text.png In reality, I interpolate/plot this 200x200 squares, and none of it is all that noticeable. However, I'm worried that I'm doing something wrong here, and that the mistake is going to come back and bite me later on. Has anyone seen anything like this? Thanks for any help you can offer with this, and thank for all of the help the list members have already given me. Rick -- Rick Muller rpm...@gm... |
|
From: Rick M. <rpm...@gm...> - 2009-07-05 00:11:01
|
Beautiful! The SVN version worked well for this.
I forgot to check whether the workaround for version 0.98.5.3 worked; you
may be right, and I may have simply forgotten to redraw the figure, but I
think I did so (I normally kill my windows between plotting).
Thanks very much for your help with this!
On Fri, Jul 3, 2009 at 1:52 PM, Jae-Joon Lee <lee...@gm...> wrote:
> The example in the cookbool works fine with svn version of mpl.
> So, it seems that this bug has been fixed.
>
> Anyhow, which command (contour or contourf) draws the vertical lines?
> I bet it is contourf. And set_edgecolor("none") for return value of
> contourf should have some effect. Did you redraw the figure?
> Regards,
>
> -JJ
>
>
> On Thu, Jul 2, 2009 at 9:20 PM, Rick Muller<rpm...@gm...> wrote:
> > Oh, and I'm using the Agg backend, I think, whatever is the default.
> >
> > On Thu, Jul 2, 2009 at 7:19 PM, Rick Muller <rpm...@gm...> wrote:
> >>
> >> JJ
> >>
> >> Thanks for the tips. I had seen one of those posts whilst googling
> around
> >> for the bug, but discounted it because I'm not using an alpha value.
> >>
> >> Here are links to one of the cookbook examples, and one of the files
> that
> >> I want to plot:
> >> http://files.getdropbox.com/u/533499/griddata-test.png
> >> http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png
> >>
> >> I'm using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.
> >>
> >> I don't know which bug in the thread you were referring to. I tried the
> >>
> >> >>> for c in CS.collections: c.set_edgecolor("none")
> >>
> >> fix, but it didn't have any effect.
> >>
> >> On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee <lee...@gm...>
> wrote:
> >>>
> >>> The dropbox link is broken (you need a public url).
> >>> What version of mpl and what backend are you using?
> >>>
> >>> There was a similar problem which has now been fixed.
> >>> Try the work-around described in the thread below, and see if works.
> >>>
> >>> http://www.nabble.com/problems-with-contourf---alpha-td22553269.html
> >>>
> >>>
> >>> Regards,
> >>>
> >>> -JJ
> >>>
> >>>
> >>>
> >>> On Thu, Jul 2, 2009 at 4:26 PM, Rick Muller<rpm...@gm...> wrote:
> >>> > When I do contourf plots in matplotlib, I get lines connecting the
> >>> > contour
> >>> > levels. This doesn't only appear to be an artifact of my plotting
> >>> > algorithms, it appears in this example from the matplotlib cookbook:
> >>> >
> >>> >
> >>> >
> http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
> >>> >
> >>> > at least on my mac.
> >>> >
> >>> > (I think this is the link to the output I get from that:
> >>> >
> https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9
> >>> > )
> >>> >
> >>> > Is there a way to keep these lines from happening? If not, is there a
> >>> > way to
> >>> > turn off all of the black lines separating the contour levels?
> >>> >
> >>> > Thanks in advance,
> >>> >
> >>> > Rick
> >>> >
> >>> > --
> >>> > Rick Muller
> >>> > rpm...@gm...
> >>> >
> >>> >
> >>> >
> ------------------------------------------------------------------------------
> >>> >
> >>> > _______________________________________________
> >>> > Matplotlib-users mailing list
> >>> > Mat...@li...
> >>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >>> >
> >>> >
> >>
> >>
> >>
> >> --
> >> Rick Muller
> >> rpm...@gm...
> >
> >
> >
> > --
> > Rick Muller
> > rpm...@gm...
> >
>
--
Rick Muller
rpm...@gm...
|