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
(23) |
2
(13) |
|
3
(1) |
4
(17) |
5
(3) |
6
(10) |
7
(7) |
8
(7) |
9
(4) |
|
10
(13) |
11
(20) |
12
(13) |
13
(17) |
14
(20) |
15
(14) |
16
(3) |
|
17
(5) |
18
(15) |
19
(18) |
20
(14) |
21
(2) |
22
(13) |
23
(8) |
|
24
(3) |
25
(7) |
26
(10) |
27
(17) |
28
(20) |
29
(42) |
|
|
From: Mark B. <ma...@gm...> - 2008-02-11 14:00:46
|
Hello Heiko - dir(graph) would at least have given you a list of the functions and attributes, so you may have been able to spot the get_xlim function. I use that a lot, Mark > > ------------------------------ > > Date: Mon, 11 Feb 2008 14:14:03 +0100 > From: Slackenerny <sla...@pu...> > Subject: Re: [Matplotlib-users] How to get current value of xlim/ylim? > To: mat...@li... > Message-ID: <161...@pu...> > Content-Type: text/plain; charset=iso-8859-15 > > Hi, > I could help myself with > > graph.get_xlim() > which I found after finally guessing the right expressions for Google, > but I wonder how I could have found it in the help() output... > I've been searching that for quite sometime and didn't come up with > anything... > So, how could I have helped myself, without annoying you? ;) > > best wishes > > |
|
From: Mark B. <ma...@gm...> - 2008-02-11 13:51:58
|
On Feb 11, 2008 2:35 PM, Michael Droettboom <md...@st...> wrote: > Before I look into this further: what version of mpl are you using? > I am using 0.91.2 using the win32 installer for Python 2.4. Thanks for looking into this, Mark |
|
From: Michael D. <md...@st...> - 2008-02-11 13:35:29
|
Before I look into this further: what version of mpl are you using?
Mark Bakker wrote:
> I seem to have tracked down the problem.
> After calling the aspect_ratio function, the data limits don't get set.
> When a new axis with sharex is called, it gets the old data limits.
> After I call draw() or ax.draw() the datalimit gets set correctly.
> And creating a subplot with sharex works fine.
> Maybe the datalimit needs to be set at the end of the aspect_ratio function?
> (I presume that is part of the draw() command)
> Mark
>
> from pylab import *
>
> x,y = meshgrid(linspace(0,5,5),linspace(0,5,5))
>
> figure()
> ax = subplot(211)
> ax.contour(x,y,x)
> ax.set_aspect('equal',adjustable='datalim')
> print ax.get_xlim() # Prints 0 to 5 while datalimit is much larger
> draw()
> print ax.get_xlim() # Now datalimit is correct and sharex works
> ax2 = subplot(212,sharex=ax)
> draw()
>
> On Feb 11, 2008 9:56 AM, Mark Bakker <ma...@gm...
> <mailto:ma...@gm...>> wrote:
>
> Hello -
>
> I have a hard time getting aspect_ratio to work correctly with sharex.
> This used to work quite a while ago, and has been broken for a long
> time (or at least I don't know how to get it to work)
> But I finally found the time to put a simple example together to
> determine if I do something wrong, or whether this can be fixed easily.
>
> When I make a small contour plot setting the aspect ratio equal
> works fine:
>
> from pylab import *
>
> x,y = meshgrid(linspace(0,5,5),linspace(0,5,5))
>
> figure()
> ax = subplot(211)
> ax.contour(x,y,x)
> ax.set_aspect('equal',adjustable='datalim')
> draw()
>
> Note that the datalim on the x-axis is expanded, as the data limit
> on the y-axis is the determining factor.
>
> If I now try to do the same thing while linking the x-axis of a
> second subplot to the first one, then
> the same call to set_aspect changes the data limit on the y-axis
> while keeping the x-axis fixed.
> That seems inconsistent and is not the behavior I want:
>
> figure()
> ax = subplot(211)
> ax.contour(x,y,x)
> ax2 = subplot(212,sharex=ax)
> ax.set_aspect('equal',adjustable='datalim')
> draw()
>
> Any idea what I am doing wrong?
>
> Thanks, Mark
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> 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
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Michael D. <md...@st...> - 2008-02-11 13:31:54
|
You shouldn't edit rcsetup.py directly -- that is part of the matplotlib source code. Instead, you should edit the matplotlibrc settings file. In there, you'll actually want to change two settings: 1) Add Cambria to the front of the font.serif list 2) Set "font.family" to "serif", so that mpl will use that list. Hope this helps, Mike chu...@ch... wrote: > I would like to be able to use Cambria font (http://en.wikipedia.org/wiki/Cambria_(typeface)) for all text on my charts. > > I am adding these charts to a MS Word 2007 document written in the same font. > > I tried to add Cambria as the fist string in rcsetup.py | defaultParams | 'font.serif'. That didn't work. Can I use this font for the charts? > > > ------------------------------------------------------------------------- > 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 -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Slackenerny <sla...@pu...> - 2008-02-11 13:15:48
|
Hi, I could help myself with > graph.get_xlim() which I found after finally guessing the right expressions for Google, but I wonder how I could have found it in the help() output... I've been searching that for quite sometime and didn't come up with anything... So, how could I have helped myself, without annoying you? ;) best wishes > Hello List, > assume I'm creating a plot via >>f = Figure(figsize=(5,4), dpi=100) >>graph = f.add_subplot(111, autoscale_on=False, xlim=[4,50], ybound=-2) >>graph.plot(x,y,"g--o", ms=5) > then the user zooms around a little does this and that. > Now I want to draw a second plot, which uses the new xlim and ylim > values from the old plot (i.e. has the same scaling). How can read out > those values? > best wishes > heiko -- Mit freundlichen Grüßen Slackenerny mailto:sla...@pu... |
|
From: Slackenerny <sla...@pu...> - 2008-02-11 12:42:18
|
Hello List, assume I'm creating a plot via >f = Figure(figsize=(5,4), dpi=100) >graph = f.add_subplot(111, autoscale_on=False, xlim=[4,50], ybound=-2) >graph.plot(x,y,"g--o", ms=5) then the user zooms around a little does this and that. Now I want to draw a second plot, which uses the new xlim and ylim values from the old plot (i.e. has the same scaling). How can read out those values? best wishes heiko |
|
From: Mark B. <ma...@gm...> - 2008-02-11 09:07:19
|
I seem to have tracked down the problem.
After calling the aspect_ratio function, the data limits don't get set.
When a new axis with sharex is called, it gets the old data limits.
After I call draw() or ax.draw() the datalimit gets set correctly.
And creating a subplot with sharex works fine.
Maybe the datalimit needs to be set at the end of the aspect_ratio function?
(I presume that is part of the draw() command)
Mark
from pylab import *
x,y = meshgrid(linspace(0,5,5),linspace(0,5,5))
figure()
ax = subplot(211)
ax.contour(x,y,x)
ax.set_aspect('equal',adjustable='datalim')
print ax.get_xlim() # Prints 0 to 5 while datalimit is much larger
draw()
print ax.get_xlim() # Now datalimit is correct and sharex works
ax2 = subplot(212,sharex=ax)
draw()
On Feb 11, 2008 9:56 AM, Mark Bakker <ma...@gm...> wrote:
> Hello -
>
> I have a hard time getting aspect_ratio to work correctly with sharex.
> This used to work quite a while ago, and has been broken for a long time
> (or at least I don't know how to get it to work)
> But I finally found the time to put a simple example together to determine
> if I do something wrong, or whether this can be fixed easily.
>
> When I make a small contour plot setting the aspect ratio equal works
> fine:
>
> from pylab import *
>
> x,y = meshgrid(linspace(0,5,5),linspace(0,5,5))
>
> figure()
> ax = subplot(211)
> ax.contour(x,y,x)
> ax.set_aspect('equal',adjustable='datalim')
> draw()
>
> Note that the datalim on the x-axis is expanded, as the data limit on the
> y-axis is the determining factor.
>
> If I now try to do the same thing while linking the x-axis of a second
> subplot to the first one, then
> the same call to set_aspect changes the data limit on the y-axis while
> keeping the x-axis fixed.
> That seems inconsistent and is not the behavior I want:
>
> figure()
> ax = subplot(211)
> ax.contour(x,y,x)
> ax2 = subplot(212,sharex=ax)
> ax.set_aspect('equal',adjustable='datalim')
> draw()
>
> Any idea what I am doing wrong?
>
> Thanks, Mark
>
>
|
|
From: Mark B. <ma...@gm...> - 2008-02-11 08:56:22
|
Hello -
I have a hard time getting aspect_ratio to work correctly with sharex.
This used to work quite a while ago, and has been broken for a long time (or
at least I don't know how to get it to work)
But I finally found the time to put a simple example together to determine
if I do something wrong, or whether this can be fixed easily.
When I make a small contour plot setting the aspect ratio equal works fine:
from pylab import *
x,y = meshgrid(linspace(0,5,5),linspace(0,5,5))
figure()
ax = subplot(211)
ax.contour(x,y,x)
ax.set_aspect('equal',adjustable='datalim')
draw()
Note that the datalim on the x-axis is expanded, as the data limit on the
y-axis is the determining factor.
If I now try to do the same thing while linking the x-axis of a second
subplot to the first one, then
the same call to set_aspect changes the data limit on the y-axis while
keeping the x-axis fixed.
That seems inconsistent and is not the behavior I want:
figure()
ax = subplot(211)
ax.contour(x,y,x)
ax2 = subplot(212,sharex=ax)
ax.set_aspect('equal',adjustable='datalim')
draw()
Any idea what I am doing wrong?
Thanks, Mark
|
|
From: <chu...@ch...> - 2008-02-11 07:05:10
|
The following script creates a chart in pdf format. All the text on the chart is searchable. I need to create a chart which will be put in a MS Word 2007 document (as part of a much larger document) and then converted to a Pdf. Which format should my chart be and which backend should I use? Thus far, I have been using Agg and putting in pngs...the quality is great but they are not searchable! Thanks.
=============================================
import matplotlib as ML
ML.use('Pdf')
import pylab as PL
fig = PL.figure()
ax1 = fig.add_subplot(111)
lstX = range(1,100)
lstY = map(lambda x:PL.sin(x/PL.pi),lstX)
ax1.plot(lstX, lstY, color=(0.87,0.0,0.0), lw=2, alpha=0.6)
ax1.set_ylabel('control of line styles, font properties, axes properties')
ax1.set_xlabel('trys to make easy things easy and hard things')
ax1.set_title('python 2D plotting library which produces', weight='bold', size='large')
fig.savefig('out', dpi=72)
=============================================
|
|
From: Alan G I. <ai...@am...> - 2008-02-10 21:00:07
|
On Sun, 10 Feb 2008, David Trémouilles apparently wrote:
> I have a slightly different objective: I just want to
> remove outliers
Do you just want to filter out the outliers?
newdata = [datum for datum in data if not isoutlier(datum)]
You can define ``isoutlier`` to return True for outliers
in your data.
Apologies if this proves OT.
fwiw,
Alan Isaac
|
|
From: <chu...@ch...> - 2008-02-10 19:39:25
|
I would like to be able to use Cambria font (http://en.wikipedia.org/wiki/Cambria_(typeface)) for all text on my charts. I am adding these charts to a MS Word 2007 document written in the same font. I tried to add Cambria as the fist string in rcsetup.py | defaultParams | 'font.serif'. That didn't work. Can I use this font for the charts? |
|
From: Pierre GM <pgm...@gm...> - 2008-02-10 19:18:43
|
On Sunday 10 February 2008 13:23:13 David Trémouilles wrote: > Thank you very much Pierre! > You made me discover boolean index (numpy is fantastic !) > In the mean time, I now understand the purpose of maskedarray that I > totally missed at a first sight. You're quite welcome. Masked arrays are great when you need a way to flag invalid or missing data. For simpler cases, boolean indexing can be faster and easier to understand. And now, for a shameless plug: if you work with series indexed with time, you might be interested in the timeseries package (available as a scikit in http://svn.scipy.org/svn/scikits/trunk/timeseries/). The package relies on the new numpy.ma package. |
|
From: David T. <dav...@gm...> - 2008-02-10 18:23:39
|
Thank you very much Pierre! You made me discover boolean index (numpy is fantastic !) In the mean time, I now understand the purpose of maskedarray that I totally missed at a first sight. Thanks to all of you, David Pierre GM a écrit : > On Sunday 10 February 2008 12:40:38 David Trémouilles wrote: > >> I have a slightly different objective: I just want to remove outliers >> from my curves. I think I will still play with maskedarray and used the >> compressed() function before 'sending' to matplotlib. >> Any comments on that, any other idea? > > So, you have two arrays x and y, with missing values in y that you don't want > to plot ? > Assuming that your arrays are 1D, you can try something like: > plot(x[logical_not(y.mask)], y.compressed()) > in order to ensure that the x and y to be plotted have the same size. > > Note that in this simple case, you don't need masked arrays, you just want to > plot point satisfying a given condition, right ? > So: > condition = (y>=min_value) & (y<= max_value) > plot(x[condition],y[condition]) > will give the same results. > > ------------------------------------------------------------------------- > 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 |
|
From: Pierre GM <pgm...@gm...> - 2008-02-10 17:49:31
|
On Sunday 10 February 2008 12:40:38 David Trémouilles wrote: > I have a slightly different objective: I just want to remove outliers > from my curves. I think I will still play with maskedarray and used the > compressed() function before 'sending' to matplotlib. > Any comments on that, any other idea? So, you have two arrays x and y, with missing values in y that you don't want to plot ? Assuming that your arrays are 1D, you can try something like: plot(x[logical_not(y.mask)], y.compressed()) in order to ensure that the x and y to be plotted have the same size. Note that in this simple case, you don't need masked arrays, you just want to plot point satisfying a given condition, right ? So: condition = (y>=min_value) & (y<= max_value) plot(x[condition],y[condition]) will give the same results. |
|
From: David T. <dav...@gm...> - 2008-02-10 17:40:46
|
Thanks Jeff, I think now I get the purpose of maskedearray the way it is used in matplotlib. I have a slightly different objective: I just want to remove outliers from my curves. I think I will still play with maskedarray and used the compressed() function before 'sending' to matplotlib. Any comments on that, any other idea? Thanks, David Jeff Whitaker a écrit : > David Trémouilles wrote: >> Hi, >> >> I've just start playing with maskedarray (the new implementation) >> using fresh svn matplotib (0_91 maintenance). >> Plotting masked array does not behave as I would have expected. >> Indeed when drawing a "line graph" the masked walues interrupted the >> line (see attach example). > > David: Yes, this is the correct behavior. The masked values are > treated as missing data. No attempt is made to fill, or interpolate, > the missing data. >> I would prefer to see a continues line... > > Then you should interpolate the missing values yourself. I think it > would be unwise for matplotlib to guess how you might want to do that. > > -Jeff >> Is it the expected behavior? Is there a way to change it? >> >> Thanks in advance, >> >> David >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> 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 > > |
|
From: John H. <jd...@gm...> - 2008-02-10 15:58:33
|
On Feb 10, 2008 9:43 AM, John Hunter <jd...@gm...> wrote: > > I want to create a scatter plot onto a background image. Anybody could help > > me?Thank you! > > The mri_demo.py example in the matplotlib/examples in the src > distribution illustrates this. Sorry -- wrong example. The example I was thinking of is examples/image_demo2.py, also at http://matplotlib.sf.net/examples/image_demo2.py but if you want to run it you will need to get the matplotlib src directory which also has the data file for the CT image JDH |
|
From: John H. <jd...@gm...> - 2008-02-10 15:43:53
|
2008/2/9 He Jibo <he...@gm...>: > Hi, Everyone, > > I want to create a scatter plot onto a background image. Anybody could help > me?Thank you! The mri_demo.py example in the matplotlib/examples in the src distribution illustrates this. |
|
From: Jeff W. <js...@fa...> - 2008-02-10 13:50:17
|
David Trémouilles wrote: > Hi, > > I've just start playing with maskedarray (the new implementation) > using fresh svn matplotib (0_91 maintenance). > Plotting masked array does not behave as I would have expected. > Indeed when drawing a "line graph" the masked walues interrupted the > line (see attach example). David: Yes, this is the correct behavior. The masked values are treated as missing data. No attempt is made to fill, or interpolate, the missing data. > I would prefer to see a continues line... Then you should interpolate the missing values yourself. I think it would be unwise for matplotlib to guess how you might want to do that. -Jeff > Is it the expected behavior? Is there a way to change it? > > Thanks in advance, > > David > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |
|
From: David T. <dav...@gm...> - 2008-02-10 11:25:26
|
Hi, I've just start playing with maskedarray (the new implementation) using fresh svn matplotib (0_91 maintenance). Plotting masked array does not behave as I would have expected. Indeed when drawing a "line graph" the masked walues interrupted the line (see attach example). I would prefer to see a continues line... Is it the expected behavior? Is there a way to change it? Thanks in advance, David |
|
From: Arnar F. <arn...@gm...> - 2008-02-10 03:28:58
|
Hi He 2008/2/10 He Jibo <he...@gm...>: > Hi, Arnar, > > Thank you for your great help!This is what I need! But this code has some > warnings, could you please help me debug it? Thank you ! > > the first error is : > Traceback (most recent call last): > File "D:/Program Files/python 2.4.3/py2exe > code/fixation_distribution_background.py", line 10, in -toplevel- > > xy = p.loadtxt(xy_fn) > AttributeError: 'module' object has no attribute 'loadtxt' loadtxt is from the numpy interface, so I assume you are not using a version of matplotlib with numpy. load() should do the job as well. The point is to get an array (xy) of shape (n_points x 2), see below. > I guess 'loadtxt' should be 'load'. After I changed this, another error > came. It is: > > Traceback (most recent call last): > File "D:/Program Files/python 2.4.3/py2exe > code/fixation_distribution_background.py", line 11, in -toplevel- > xy_normed = xy/[[1024./im.shape[1], 768./im.shape[0]]] > ValueError: shape mismatch: objects cannot be broadcast to a single shape If the array xy has shape (8,2) this broadcast should be fine. Again, this could be an issue with your version of Numeric/Numarray/(old numpy). I dont know these old libraries well enough to say for sure. I think at least Numeric uses same type of broadcasting as numpy. So, what kind of numeric library are you using and what is the shape of xy after you have loaded the fixation-textfile? Arnar PS: For reference my versions are as follows: numpy.__version__ : '1.0.5.dev' matplotlib.__version__ : '0.91.2' Broadcasting explained: http://www.scipy.org/EricsBroadcastingDoc |
|
From: Gary R. <gr...@bi...> - 2008-02-10 01:55:09
|
Hi Jibo, I'm not sure of your reasons for wanting to do this, but you might find the psychopy package of interest: http://www.psychopy.org/ Gary R. He Jibo wrote: > Hi, Everyone, > > I want to create a scatter plot onto a background image. Anybody could > help me?Thank you! > > The background.PNG is shown full screen with a resolution of 1024*768. > The data in the fixation_xy.txt is the coordinates of eye-movement data, > first column for X axis, second column for Y axis. I wish to do a > scatter plot with the data onto background.PNG. Please give me a helping > hand how could I do this with matplotlib. > > Thank you ! > > Jibo > > > > -- > Best Regards, > > He Jibo > ji...@cy... > <mailto:ji...@cy...> > he...@gm... <mailto:he...@gm...> |
|
From: Arnar F. <arn...@gm...> - 2008-02-10 01:43:35
|
> The background.PNG is shown full screen with a resolution of 1024*768. The > data in the fixation_xy.txt is the coordinates of eye-movement data, first > column for X axis, second column for Y axis. I wish to do a scatter plot > with the data onto background.PNG. Please give me a helping hand how could I > do this with matplotlib. !! I am assuming xy-fixation (screen coordinates) values are given with respect to a a lower left origin. (see line [*] in code) import pylab as p im_fn = "background.PNG" xy_fn = "fixation_xy.txt" s = 100 # marker size c = 'r' # marker color marker = 's' # marker type im = p.imread(im_fn) xy = p.loadtxt(xy_fn) xy_normed = xy/[[1024./im.shape[1], 768./im.shape[0]]] p.imshow(im, origin='lower') # [*] p.scatter(xy_normed[:,0], xy_normed[:,1], s=s, c=c, marker=marker) p.show() Arnar |
|
From: He J. <he...@gm...> - 2008-02-09 23:30:49
|
550.4 329.2 314.3 453 518.9 338.6 519.8 330.5 553.9 326.2 902.2 586.1 549.4 323.2 339.5 289.2 |
|
From: Jon L. <jlo...@um...> - 2008-02-09 16:06:02
|
Sorry to bother everyone with this post. I am new to matplotlib and python in general and am finding a problem that I don't understand. I've downloaded the scipy superpack (through easy_install) from C. Fonnesbeck (http://trichech.us) and receive and error when plotting (example below). Personally I do not know enough to diagnose it nor fix the problem. what is _wx.py relate to? How am I getting C++ assertion failures, shouldn't this go through gcc? Thanks for the help. Jon system: mac os 10.5, python 2.5.1 Problem: >>> from pylab import * >>> plot([1,2,3,4]) [<matplotlib.lines.Line2D object at 0x6ae9a90>] >>> show() Traceback (most recent call last): File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 1019, in _onPaint self.gui_repaint(drawDC=wx.PaintDC(self)) File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 924, in gui_repaint wx.GetApp().Yield() File "/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac- unicode/wx/_core.py", line 7119, in Yield wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ../src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively Traceback (most recent call last): File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 1019, in _onPaint self.gui_repaint(drawDC=wx.PaintDC(self)) File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 924, in gui_repaint wx.GetApp().Yield() File "/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac- unicode/wx/_core.py", line 7119, in Yield wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ../src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively Traceback (most recent call last): File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 1019, in _onPaint self.gui_repaint(drawDC=wx.PaintDC(self)) File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 924, in gui_repaint wx.GetApp().Yield() File "/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac- unicode/wx/_core.py", line 7119, in Yield wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ../src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively Traceback (most recent call last): File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 1019, in _onPaint self.gui_repaint(drawDC=wx.PaintDC(self)) File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 924, in gui_repaint wx.GetApp().Yield() File "/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac- unicode/wx/_core.py", line 7119, in Yield wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ../src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively Traceback (most recent call last): File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 1019, in _onPaint self.gui_repaint(drawDC=wx.PaintDC(self)) File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5- macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py", line 924, in gui_repaint wx.GetApp().Yield() File "/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac- unicode/wx/_core.py", line 7119, in Yield wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ../src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively |
|
From: sa6113 <s.p...@gm...> - 2008-02-09 08:34:07
|
Hello there, I have a problem on curve fitting , would you please help me ?! I want to to develop a application that reads a text file with 2 columns of floating point data (as x and y) and performs a polynomial curve fit of the data at the order specified by the end user and then provides the curve-fit coefficients as well as the curve fit errors. My problem is in curve fit errors , I want to abtain Max and L2-norm of error. In addition I use "matplotlib.mlab module " and polyfit function for computing polynomial curve fit. Regards. -- View this message in context: http://www.nabble.com/Curve-fitting-...-tp15369630p15369630.html Sent from the matplotlib - users mailing list archive at Nabble.com. |