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: Michael C. <mc...@ca...> - 2009-07-06 22:46:11
|
Hi all, I am trying to produce a weighted histogram. The help text for "hist" here: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.hist has a mention of adding weights, but it is not noted in the command line section where this should appear. Calling: hist(data,20,data_weights) gives the error: File "/usr/local/python-2.5.2/lib/python2.5/site-packages/matplotlib/pyplot.py", line 1868, in hist ret = gca().hist(*args, **kwargs) File "/usr/local/python-2.5.2/lib/python2.5/site-packages/matplotlib/axes.py", line 6236, in hist normed=bool(normed), new=True) File "/usr/local/python-2.5.2/lib/python2.5/site-packages/numpy/lib/function_base.py", line 353, in histogram mn, mx = range ValueError: too many values to unpack Calling: hist(data,20,weights=data_weights) gives the error: File "/usr/local/python-2.5.2/lib/python2.5/site-packages/matplotlib/pyplot.py", line 1868, in hist ret = gca().hist(*args, **kwargs) File "/usr/local/python-2.5.2/lib/python2.5/site-packages/matplotlib/axes.py", line 6371, in hist p.update(kwargs) File "/usr/local/python-2.5.2/lib/python2.5/site-packages/matplotlib/artist.py", line 453, in update raise AttributeError('Unknown property %s'%k) AttributeError: Unknown property weights There's no indication in the help text of where or how to insert the weights array. Thanks in advance, Michael |
|
From: jcm52 <joe...@gm...> - 2009-07-06 15:53:48
|
Perhaps this is a new feature since you sent this request, but I just came
across
pylab.suptitle('my super title')
Seems to work fairly well, but the font sizes don't appear to behave as well
as I'd like.
Tommy Grav wrote:
>
> I have a plot that is divided into four subplots.
>
> pylab.figure()
> pylab.subplot(221)
> pylab.plot(a,b,"k-")
> pylab.subplot(222)
> pylab.plot(a,b,"k-")
> pylab.subplot(223)
> pylab.plot(a,b,"k-")
> pylab.subplot(224)
> pylab.plot(a,b,"k-")
>
> I would like to add a title to the entire plot, but pylab.title() only
> applies to the most recent subplot. I have tried
>
> pylab.figure()
> pylab.subplot(111)
> pylab.title("Title Here")
> pylab.subplot(221)
> pylab.plot(a,b,"k-")
> pylab.subplot(222)
> pylab.plot(a,b,"k-")
> pylab.subplot(223)
> pylab.plot(a,b,"k-")
> pylab.subplot(224)
> pylab.plot(a,b,"k-")
>
> but this does not work as I do not create a plot for
> the subplot(111) instance. Is there some way of getting
> the type of title I want easily?
>
> Cheers
> Tommy
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
View this message in context: http://www.nabble.com/title-when-using-subplot-tp15066004p24357703.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Oliver T. <oli...@no...> - 2009-07-06 11:27:01
|
Hi,
Windows XP
Python 2.5.2
matplotlib 0.98.5.2
I try to use numpoints for a legend my plot, but without luck. I always
end up having three points in the legend despite setting numpoints=1 (see
below towards the end of the code).
Things work nicely though in a much simpler script.
Help is greatly appreciated.
Cheers
Oliver
[CODE START]
# Import necessary modules
import numpy as np
import matplotlib.pyplot as plt
# Import data for correlation plot
assC = np.loadtxt('Apples_flowerFlavour_assC_corrPlot.txt')
all = np.loadtxt('Apples_flowerFlavour_allAssessors_corrPlot.txt')
x_assC = assC[:,1].copy()
y_assC = assC[:,0].copy()
x_all = all[:,1].copy()
y_all = all[:,0].copy()
# Plot values
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(x_all, y_all, s=10, c='w', marker='o', edgecolor='grey',
label='_')
# NOTE: label='_' excludes the lable from legend
ax.scatter([x_assC[0]], [y_assC[0]], s=50, c='r', marker='s', label='Apple
Golden')
ax.scatter([x_assC[1]], [y_assC[1]], s=50, c='r', marker='v',
label='Granny Smith')
ax.scatter([x_assC[2]], [y_assC[2]], s=50, c='r', marker='d', label='Green
Star')
ax.scatter([x_assC[3]], [y_assC[3]], s=50, c='r', marker='^',
label='Kanzi')
ax.scatter([x_assC[4]], [y_assC[4]], s=50, c='r', marker='>', label='Pink
Lady')
ax.scatter([x_assC[5]], [y_assC[5]], s=50, c='r', marker='<', label='Royal
Gala')
ax.scatter([x_assC[6]], [y_assC[6]], s=35, c='r', marker='o',
label='Ecological')
ax.plot([0,10], [0,10], 'b--')
ax.set_xlim(0,10)
ax.set_ylim(0,10)
# Fix legend settings
plt.legend(loc='lower right', shadow=True, numpoints=1)
ltext = plt.gca().get_legend().get_texts()
plt.setp(ltext[0], fontsize = 10, color = 'k')
ax.set_xlabel('panel average')
ax.set_ylabel('assessor C')
plt.show()
[CODE END]
|
|
From: guillaume r. <gra...@wy...> - 2009-07-06 08:59:38
|
Jae-Joon Lee wrote: > Well, if you think something is wrong, I guess you may have chosen a > wrong tool. > MPL is mainly for 2d plotting, and not very strong for animation > although it supports some. I just think that I have a nice hammer, a nice nail ... and not a clue on how to use a hammer (I'm a python noob, and high level language noob in general, the highest level language I used before starting python was C ... for embedded devices) I just though that I was thinking in the wrong way. > One possible option in your case is to save your plot as an image in > each round. And at the next round, you plot the newly available data > upon the shifted image. > > http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk2.html thanks, this looks great :) ---- This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you. Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie. ---- |
|
From: Ondrej C. <on...@ce...> - 2009-07-06 06:13:42
|
On Tue, Jun 30, 2009 at 12:09 PM, Ondrej Certik<on...@ce...> wrote: > Hi, > > this must have been answered many times already, but I searched the > archives, online docs, but couldn't find anything. > > If I do: > > $ python > Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) > [GCC 4.3.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import pylab >>>> pylab.plot([1, 3, 3]) > [<matplotlib.lines.Line2D object at 0x2154350>] >>>> pylab.show() >>>> pylab.show() >>>> > > the first pylab.show() shows the plot and stays hanging (this is ok) > and then if I close it, to get back to the shell, the second call to > show() does nothing. > > One fix is to use: > > ipython --pylab > > but if I just want to call regular python, or from my own script --- > how do I plot for the second time? I still haven't figured out how to fix it, so any feedback would be appreciated. Thanks, Ondrej |
|
From: Rick M. <rpm...@gm...> - 2009-07-06 01:08:59
|
Meant to copy this to the list as well for completeness. ---------- Forwarded message ---------- From: Rick Muller <rpm...@gm...> Date: Sun, Jul 5, 2009 at 2:03 PM Subject: Re: [Matplotlib-users] Empty squares at end of data after interpolation with griddata? To: Jeff Whitaker <js...@fa...> The link should work now. What you say about extrapolation makes perfect sense. I wonder why those points aren't being computed. In any case, thanks for the help! Rick On Sun, Jul 5, 2009 at 7:27 AM, Jeff Whitaker <js...@fa...> wrote: > > 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. > > -- Rick Muller rpm...@gm... -- Rick Muller rpm...@gm... |
|
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...
|
|
From: Fabrice S. <si...@lm...> - 2009-07-04 11:49:37
|
Le mardi 30 juin 2009 à 13:21 -0400, Jae-Joon Lee a écrit : > Hi Fabrice, > > Good to hear that you were able to get it work. > Here is some tweak on transforms. > This way, the plot is shown correctly even if you change the y-limits of axes. > > trans0 = blended_transform_factory(ax0.transData, ax0.transAxes) > trans1 = blended_transform_factory(ax1.transData, ax1.transAxes) > > bbox = Bbox.from_extents(xmin, 0, xmax, 1) > > mybbox1 = TransformedBbox(bbox, trans0) > mybbox2 = TransformedBbox(bbox, trans1) Thanks for these suggestions, I'll try on monday. > I think the code is worth to be included as an mpl example. > I'll push this into the svn if you don't mind. Great ! I assume a BSD license... -- Fabrice Silva <si...@lm...> LMA UPR CNRS 7051 - équipe S2M |
|
From: Jae-Joon L. <lee...@gm...> - 2009-07-03 20:17:19
|
On Fri, Jul 3, 2009 at 1:05 PM, guillaume ranquet<gra...@wy...> wrote: > but something sounds plain wrong, It sounds like there's too much > useless calculations and data copied. > Well, if you think something is wrong, I guess you may have chosen a wrong tool. MPL is mainly for 2d plotting, and not very strong for animation although it supports some. > would it be a good idea to have an array of 1000 points and shift it > left every round to add the new point at the end? Shifting array should be done by numpy, not by matplotlib (I'm not sure if numpy can do this in place). Anyhow, what actually matter is that even if you shift the array, matplotlib will draw all the points in the array every time. One possible option in your case is to save your plot as an image in each round. And at the next round, you plot the newly available data upon the shifted image. http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk2.html Note that the above example requires svn version of matplotlib. Regards, -JJ |
|
From: Jae-Joon L. <lee...@gm...> - 2009-07-03 19:52:47
|
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...
>
|