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
(8) |
|
2
(2) |
3
(8) |
4
(19) |
5
(19) |
6
(25) |
7
(8) |
8
(1) |
|
9
|
10
(15) |
11
(22) |
12
(8) |
13
(4) |
14
(1) |
15
|
|
16
(1) |
17
(20) |
18
(17) |
19
(13) |
20
(17) |
21
(7) |
22
(5) |
|
23
(6) |
24
(14) |
25
(14) |
26
(18) |
27
(21) |
28
(5) |
29
(9) |
|
30
(6) |
|
|
|
|
|
|
|
From: Eric F. <ef...@ha...> - 2006-04-04 22:38:29
|
Lionel Roubeyrie wrote: > Hi all, > I'm new in the matplotlib word, and I try to plot a windrose, but I don't find > any function doing that. Then, trying to solve that by the polar plot, I > don't find how to say matplotlib to plot bar char on polar axes. Can someone > gives me a way? > thanks > Lionel, Polar axis support is embryonic; I don't see an easy way to make a polar bar chart. You could make the bar outlines using "plot" on a polar axis. Eric |
|
From: Darren D. <dd...@co...> - 2006-04-04 22:31:39
|
On Tuesday 04 April 2006 17:03, John Hunter wrote:
> >>>>> "Steve" == Steve Schmerler <el...@gm...> writes:
>
> Steve> Hi In the plot produced by this here the straight line
> Steve> isn't really straight and seems to "try to interpolate" the
> Steve> data points.
>
>
> Steve> x = linspace(0.016, 0.017, 20) y = 1000*x+5 +
> Steve> randn(len(x))/30.0 p = polyfit(x,y,1) plot(x, y, 'o', x,
> Steve> polyval(p, x), 'r') savefig('image.eps')
>
> Steve> The same happens with p[0]*x+p[1] instead of polyval(p, x).
> Steve> In the corresponding .png is OK so it seems to be a problem
> Steve> with the ps-backend.
>
> This is the same bug that cropped up in your last post -- it is a
> truncation bug in backend ps. 1.4g isn't doing it for us... For
> testing I jacked up all the 1.4g fmt strings to 1.9g and the line
> straightened itself out.
>
> This persistent problem strengthens my belief that the ps backend
> should be outputting transformed coords, since we can then precisely
> know the size of the rounding error, eg in fractions of a point.
I agree. As of svn 2257, the transforms are done by backend_ps, instead of
being passed to the postscript interpreter.
On a side note, may I suggest that svn users should read and post to the
matplotlib-devel list?
|
|
From: Christopher B. <Chr...@no...> - 2006-04-04 21:34:58
|
Rob Knight wrote:
> If you want to add an option to do things in viewport coordinates,
> suggest adding viewport_coords=False in the parameter list, set to True
> for viewport. I believe there are hooks to get the transformation
> between data and viewport coordinates in mpl already,
This isn't as simple as we might like. That's something to keep in mind
for future revisions of the API. However, for now, you can use:
matplotlib.collections.LineCollection
matplotlib.collections.PolyCollection
matplotlib.collections.PatchCollection
And a bunch of tricks with transforms.
I've enclosed and example for drawing what I call a Vector Plot. I'd be
glad to clean this up and contribute it if people think it's generally
useful.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: John H. <jdh...@ac...> - 2006-04-04 21:06:02
|
>>>>> "Steve" == Steve Schmerler <el...@gm...> writes:
Steve> Hi In the plot produced by this here the straight line
Steve> isn't really straight and seems to "try to interpolate" the
Steve> data points.
Steve> x = linspace(0.016, 0.017, 20) y = 1000*x+5 +
Steve> randn(len(x))/30.0 p = polyfit(x,y,1) plot(x, y, 'o', x,
Steve> polyval(p, x), 'r') savefig('image.eps')
Steve> The same happens with p[0]*x+p[1] instead of polyval(p, x).
Steve> In the corresponding .png is OK so it seems to be a problem
Steve> with the ps-backend.
This is the same bug that cropped up in your last post -- it is a
truncation bug in backend ps. 1.4g isn't doing it for us... For
testing I jacked up all the 1.4g fmt strings to 1.9g and the line
straightened itself out.
This persistent problem strengthens my belief that the ps backend
should be outputting transformed coords, since we can then precisely
know the size of the rounding error, eg in fractions of a point.
JDH
|
|
From: Darren D. <dd...@co...> - 2006-04-04 21:02:37
|
On Tuesday 04 April 2006 16:32, Steve Schmerler wrote:
> Hi
>
> In the plot produced by this here the straight line isn't really
> straight and seems to "try to interpolate" the data points.
>
>
> x = linspace(0.016, 0.017, 20)
> y = 1000*x+5 + randn(len(x))/30.0
> p = polyfit(x,y,1)
> plot(x, y, 'o', x, polyval(p, x), 'r')
> savefig('image.eps')
>
> The same happens with p[0]*x+p[1] instead of polyval(p, x).
> In the corresponding .png is OK so it seems to be a problem with the
> ps-backend.
version please
|
|
From: Gil C. <ci...@gm...> - 2006-04-04 21:01:25
|
I am trying to build Matplot 0.87.2 from source which I got from http://sourceforge.net/project/showfiles.php?group_id=3D80706 By following the directions at http://matplotlib.sourceforge.net/installing.html under Debian 3.1r0a for AMD64 When I type python setup.py build, I get this error cannot find tcl/tk headers. giving up. /usr/lib/tcl8.4 and /usr/lib/tk8.4 both exist. According to this previous posting in response to the same problem http://sourceforge.net/mailarchive/message.php?msg_id=3D15032585 setupext.py must be edited to make sure the libraries are found.=20 However, I tried editing it and the error did not change. Here is the diff between the old and new versions of setupext.py, and I'm attaching both versions to this message. Can anyone suggest what else I could try? Thanks. Gil Citro 38,39c38,39 < 'linux2' : ['/usr/local', '/usr',], < 'linux' : ['/usr/local', '/usr',], --- > 'linux2' : ['/usr/local', '/usr', '/usr/lib',], > 'linux' : ['/usr/local', '/usr', '/usr/lib',], 312,316c312,316 < o.tcl_lib =3D "/usr/local/lib" < o.tcl_inc =3D "/usr/local/include" < o.tk_lib =3D "/usr/local/lib" < o.tk_inc =3D "/usr/local/include" < o.tkv =3D "" --- > o.tcl_lib =3D "/usr/lib" > o.tcl_inc =3D "/usr/include" > o.tk_lib =3D "/usr/lib" > o.tk_inc =3D "/usr/include" > o.tkv =3D "8.4" 337a338,340 > > |
|
From: Steve S. <el...@gm...> - 2006-04-04 20:25:28
|
Hi
In the plot produced by this here the straight line isn't really
straight and seems to "try to interpolate" the data points.
x = linspace(0.016, 0.017, 20)
y = 1000*x+5 + randn(len(x))/30.0
p = polyfit(x,y,1)
plot(x, y, 'o', x, polyval(p, x), 'r')
savefig('image.eps')
The same happens with p[0]*x+p[1] instead of polyval(p, x).
In the corresponding .png is OK so it seems to be a problem with the
ps-backend.
cheers,
steve
--
When danger or in doubt, run in circles, scream and shout.
|
|
From: Rob K. <ro...@sp...> - 2006-04-04 19:40:23
|
This isn't a bug in fancy_arrow -- this code intentionally does
everything in data coordinates because that's the application we have
for the arrows (we use both the location and size to display
quantitative information).
If you want to add an option to do things in viewport coordinates, that
would be great, but please don't break the existing functionality. I
suggest adding viewport_coords=False in the parameter list, set to True
for viewport. I believe there are hooks to get the transformation
between data and viewport coordinates in mpl already, but I will not
have time to look into this until after I finish teaching this
semester. As John kindly pointed out, the documentation in the module
itself is fairly extensive, although there is no external documentation
at this point.
From inside the script, you'll want to access things from the axis's
object model rather than importing pylab. Hope this is useful.
Rob
On Mar 31, 2006, at 11:27 PM, Ryan Krauss wrote:
> It seems like the problem is here:
>
> cx = float(dx)/distance
> sx = float(dy)/distance
> m = array([[cx, sx],[-sx,cx]])
> matrixmultiply(coords, M)
>
> and this same code is used in regular arrow and fancy arrow. This
> code is rotating by and angle whose tangent is dy/dx. That is only
> going to look right to me if the x and y ranges are the same. I tried
> building a hack to define my own rotation angle based on scaling dx
> and dy by the axis span, but I don't know how to determine the x and y
> limits from within patches.py. I don't seem to have access to gca()
> or ylim() from within that script.
>
> Ryan
>
> On 4/1/06, Ryan Krauss <rya...@gm...> wrote:
>> Things are going o.k. with the fancy arrow, but I am not real happy
>> with the shape of my arrow head. It doesn't seem like the back of the
>> arrow head is perpendicular to the arrow line. I am generating an
>> arrow with the following code:
>>
>> arrow_params={'length_includes_head':True, 'shape':'full', \
>> 'head_starts_at_zero':True}
>>
>> arrow(-6.7,
>> -4.5,5.4,3.2,head_width=1.5,head_length=1.0,fc='k',**arrow_params)
>>
>> It seems like the problem is that my x and y axes limits are the same.
>> If I change the axes so they are roughly square, I get a good looking
>> arrow head, but my plot isn't zoomed very well.
>>
>> Ryan
>>
>> On 4/1/06, Ryan Krauss <rya...@gm...> wrote:
>>> I guess I am o.k. I don't know what I was doing wrong at first. I
>>> think I was drawing the arrow off the visible part of the plot. I
>>> seem to get pretty good results from
>>>
>>> pylab.arrow(-30,10,10,10,head_width=2,fc='k')
>>>
>>> and I can infer some of the options from this line in arrow_demo.py
>>> (181-183):
>>>
>>> arrow(x_pos, y_pos, x_scale*length, y_scale*length, \
>>> fc=fc, ec=ec, alpha=alpha, width=width,
>>> head_width=head_width, \
>>> head_length=head_length, **arrow_params)
>>>
>>> It would be great though if the docstring was more help:
>>>
>>> Help on function arrow in module matplotlib.pylab:
>>>
>>> arrow(*args, **kwargs)
>>> Draws arrow on specified axis from (x,y) to (x+dx,y+dy).
>>> Addition kwargs: hold = [True|False] overrides default hold state
>>>
>>> Ryan
>>>
>>> On 3/31/06, John Hunter <jdh...@ac...> wrote:
>>>>>>>>> "Ryan" == Ryan Krauss <rya...@gm...> writes:
>>>>
>>>> Ryan> I am struggling to learn how to use the new fancy arrow.
>>>> Ryan> Does anyone have a short example of its use or is there
>>>> Ryan> documentation aside from arrow_demo.py?
>>>>
>>>> Hey Ryan,
>>>>
>>>> I'm CC-ing Rob Knight, who wrote the arrow code. Perhaps you can
>>>> provide some additional detail about what you are trying to
>>>> accomplish, what you've tried, and what you don't understand.
>>>>
>>>> Rob, the arrow_demo.py example Ryan is referring to is the one you
>>>> sent with your original contribution, ie
>>>>
>>>>
>>>> http://svn.sourceforge.net/viewcvs.cgi/matplotlib/trunk/matplotlib/
>>>> examples/arrow_demo.py?view=markup&rev=2188
>>>>
>>>> Thanks!
>>>> JDH
>>>>
>>>
>>
>>
>>
|
|
From: Kimo J. <ki...@ma...> - 2006-04-04 18:00:22
|
Thanks. I commented out the lines you suggested and MPL compiles and runs. I haven't done extensive testing, but I am able to generate simple plots. Kimo On Apr 2, 2006, at 10:42 PM, matplotlib-users- re...@li... wrote: > > Message: 1 > From: Robert Hetland <he...@ta...> > Subject: Re: [Matplotlib-users] compile problems on MacBook Pro > Date: Sun, 2 Apr 2006 16:12:18 -0500 > To: matplotlib-users <mat...@li...> > > > I had the same problem, and solved it by deleting the lines in the > arrayobject header file that (re)defined uint and ushort. MPL > compiles fine after this change. I think this is an issue with > changing numpy, and not with the Intel Mac in general. > > Has anybody else run into this issue? > > -Rob. > > On Apr 1, 2006, at 8:45 AM, Kimo Johnson wrote: > >> Hi, >> >> I'm trying to install matplotlib on my MacBook Pro. I installed >> python 2.4.3 using the Universal-MacPython-2.4.3.dmg installer and >> then installed NumPy 0.9.6 from source. I have libfreetype and >> libpng in /usr/local/lib, probably from my LaTeX install (using >> MacTeX-20060314.dmg from www.ctan.org). >> >> Below are the errors I get when I run python setup.py build for >> matplotlib. Any help would be appreciated. >> >> Thanks, >> Kimo >> >> >> In file included from src/_ns_cntr.c:28: >> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >> site-packages/numpy/core/include/numpy/arrayobject.h:139: error: >> redefinition of typedef 'ushort' >> /usr/include/sys/types.h:85: error: previous declaration of >> 'ushort' was here >> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >> site-packages/numpy/core/include/numpy/arrayobject.h:140: error: >> redefinition of typedef 'uint' >> /usr/include/sys/types.h:86: error: previous declaration of 'uint' >> was here >> ...(similar errors) >> lipo: can't figure out the architecture type of: /var/tmp// >> ccUP1QvZ.out >> error: Command "gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/ >> MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp- >> precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -I/Library/ >> Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- >> packages/numpy/core/include -I/usr/local/include -I/usr/include -I. >> -I/Library/Frameworks/Python.framework/Versions/2.4/include/ >> python2.4 -c src/_ns_cntr.c -o build/temp.macosx-10.4-fat-2.4/src/ >> _ns_cntr.o -DSCIPY=1" failed with exit status 1 > > ---- > Rob Hetland, Assistant Professor > Dept of Oceanography, Texas A&M University > p: 979-458-0096, f: 979-845-6331 > e: he...@ta..., w: http://pong.tamu.edu > |
|
From: manouchk <man...@gm...> - 2006-04-04 17:14:18
|
Le Mardi 04 Avril 2006 12:27, Marin Manuel a =E9crit=A0:
> Hi,
>
> >So how to put "\f" in a variable in python?
>
> You either have to escape the \ :
> ylab=3D"$RRR [\\frac{R(300K)}{R(10K)}]$"
>
> or use raw strings:
> ylab=3Dr"$RRR [\frac{R(300K)}{R(10K)}]$"
>
> Marin
Ok thank you, I didn't have already integrated the concept of raw string! B=
ut=20
now it is.
Emmanuel
|
|
From: Tom L. <lo...@as...> - 2006-04-04 16:11:47
|
Hi folks, I'm just checking in with the solution to my Panther bus error issue, in case it might help someone else, but also to publicly thank John for walking me through the diagnosis. It turns out the problem was due to using an old version of gcc. The owner of the PowerBook I was installing mpl on hadn't installed Apple's gcc updaters. He had gcc 3.3, but not Apple's most recent build, which fixes some C++ issues. As a result, C and Fortran extensions built fine, but C++ extensions built with pycxx resulted in bus errors. For example, "import pylab" produced a bus error, but >>> import matplotlib.backends._tkagg >>> import matplotlib.agg produced no errors, because these extensions are not built with pycxx. A rebuild after updating gcc led to a working mpl. John figured this out from the pattern of which modules loaded and which led to errors. I never would've figured it out on my own. numpy and scipy both installed fine with the older gcc and passed all tests. I wonder if they should be reinstalled. If anyone knows about this, please let me know. The owner is uncomfortable installing things from source, and I only have infrequent contact with him, so if these need fixing I'd like to do it soon. Cheers, Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ |
|
From: Marin M. <mar...@un...> - 2006-04-04 15:27:55
|
Hi,
>So how to put "\f" in a variable in python?
>
You either have to escape the \ :
ylab=3D"$RRR [\\frac{R(300K)}{R(10K)}]$"
or use raw strings:
ylab=3Dr"$RRR [\frac{R(300K)}{R(10K)}]$"
Marin
--=20
Laboratory of Neurophysics and Physiology
UMR 8119 CNRS-Universit=E9 Ren=E9 Descartes
45, rue des Saints-P=E8res
75270 Paris Cedex 06
France
|
|
From: Christian M. <mee...@un...> - 2006-04-04 15:21:07
|
Hi,
I'd advise to use 'raw strings' like:
ylab = r'$RRR [\frac{R(300K)}{R(10K)}]$'
If you then type 'ylab' in interative mode, you'll see:
'$RRR [\\frac{R(300K)}{R(10K)}]$'
Voila: Backslashes get escaped automatically.
Cheers
Christian
On Tuesday 04 April 2006 17:24, manouchk wrote:
> Hi,
>
> My little problem is simple. I want to use a variable to define labels on a
> graph. If I want to create a fraction, I have to use function \frac but
> when I do that :
> ylab="$RRR [\frac{R(300K)}{R(10K)}]$"
> The value stored in ylab is :
> '$RRR [\x0crac{R(300K)}{R(10K)}]$'
>
> So how to put "\f" in a variable in python?
>
>
|
|
From: manouchk <man...@gm...> - 2006-04-04 15:13:57
|
Hi,
My little problem is simple. I want to use a variable to define labels on a
graph. If I want to create a fraction, I have to use function \frac but when
I do that :
ylab="$RRR [\frac{R(300K)}{R(10K)}]$"
The value stored in ylab is :
'$RRR [\x0crac{R(300K)}{R(10K)}]$'
So how to put "\f" in a variable in python?
|
|
From: Lionel R. <lro...@li...> - 2006-04-04 09:48:41
|
Hi all, I'm new in the matplotlib word, and I try to plot a windrose, but I don't find any function doing that. Then, trying to solve that by the polar plot, I don't find how to say matplotlib to plot bar char on polar axes. Can someone gives me a way? thanks -- Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |
|
From: James C. <cou...@sk...> - 2006-04-04 06:55:58
|
Hi, While the savefig() command works fine, I am unable to get anything to appear when I use show(). Instead, the program hangs (until I hit ctrl-C to exit). Here is the verbose output of a simple script, jnk.py: from pylab import * plot([1,2,3]) show() When run from Cygwin, I get the following (below). Similar output is produced when I try other backends. Any advice? Thanks, James $ python jnk.py --verbose-helpful matplotlib data path c:\python23\share\matplotlib $HOME=C:\cygwin\home\James CONFIGDIR=C:\cygwin\home\James\.matplotlib loaded rc file c:\python23\share\matplotlib\matplotlibrc matplotlib version 0.83.2 verbose.level helpful interactive is False platform is win32 numerix Numeric 23.3 numerix Numeric 23.3 font search path ['c:\\python23\\share\\matplotlib'] loaded ttfcache file C:\cygwin\home\James\.matplotlib\ttffont.cache font search path ['c:\\python23\\share\\matplotlib'] loaded ttfcache file C:\cygwin\home\James\.matplotlib\ttffont.cache backend TkAgg version 8.4 Traceback (most recent call last): File "jnk.py", line 6, in ? show() File "C:\PYTHON23\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin e 75, in show Tk.mainloop() File "C:\PYTHON23\lib\lib-tk\Tkinter.py", line 284, in mainloop _default_root.tk.mainloop(n) KeyboardInterrupt |
|
From: Josh M. <jos...@gm...> - 2006-04-04 03:54:36
|
Oops, my bad. That script was just a quick sample I rigged up. The zeros weren't actually causing the problem. It did make me look elsewhere though. The problem was caused by me assuming I need to pass in the xticks already logarithmically scaled, which was incorrect. Thanks for the help Darren. Cheers, Josh |
|
From: Darren D. <dd...@co...> - 2006-04-04 03:10:36
|
On Monday 03 April 2006 10:57 pm, Josh Marshall wrote: > When I run the following script: > > import numpy as N > from pylab import * > t = N.arange[0,8*N.pi, 0.1] > y = N.sin(t) > > figure() > plot(t,y) > xticks(N.arange(0,8*N.pi, N.pi)) > > figure() > semilogx(t,y) > xticks(N.arange(0,8*N.pi, N.pi)) > > The first plot will work fine, and set the x-ticks to be multiples of > pi, as desired. > > However, the second plot does not work. I have verified this is the > case whenever log axes are used: you can't then set the x-ticks or > labels. > > Is this a bug or a design feature? It is neither. log(0) is not plottable, you need to pick more appropriate xticks. |
|
From: Josh M. <jos...@gm...> - 2006-04-04 02:57:10
|
When I run the following script:
import numpy as N
from pylab import *
t =3D N.arange[0,8*N.pi, 0.1]
y =3D N.sin(t)
figure()
plot(t,y)
xticks(N.arange(0,8*N.pi, N.pi))
figure()
semilogx(t,y)
xticks(N.arange(0,8*N.pi, N.pi))
The first plot will work fine, and set the x-ticks to be multiples of
pi, as desired.
However, the second plot does not work. I have verified this is the
case whenever log axes are used: you can't then set the x-ticks or
labels.
Is this a bug or a design feature? I am interested in doing this since
I am plotting FFTs on a log-log plot, and wish to label the x-axis
('100 kHz', '1 MHz', etc...) and the y-axis in dB.
If it helps, there are two errors that are given. The first is when
attempting calling the xticks function, which throws an exception:
C:\Python24\lib\site-packages\matplotlib\figure.py in draw(self, renderer)
527
528 # render the axes
--> 529 for a in self.axes: a.draw(renderer)
530
531 # render the figure text
C:\Python24\lib\site-packages\matplotlib\axes.py in draw(self, renderer, in=
fram
)
1407 renderer.open_group('axes')
1408
-> 1409 try: self.transData.freeze() # eval the lazy objects
1410 except ValueError:
1411 print >> sys.stderr, 'data freeze value error', self.ge=
t_po
ition(), self.dataLim.get_bounds(), self.viewLim.get_bounds()
ValueError: Domain error on eval_scalars in Transformation::freeze
The second is then when the mouse is moved over the plot, or we try to
update the plot, and the exceptions are:
File "C:\Python24\lib\site-packages\matplotlib\axes.py", line 633,
in format_coord
xs =3D self.format_xdata(x)
File "C:\Python24\lib\site-packages\matplotlib\axes.py", line 615,
in format_xdata
val =3D func(x)
File "C:\Python24\lib\site-packages\matplotlib\ticker.py", line 401,
in format_data
value =3D strip_math(self.__call__(value))
File "C:\Python24\lib\site-packages\matplotlib\ticker.py", line 471,
in __call__
fx =3D math.log(x)/math.log(b)
TypeError: a float is required
Thanks,
Josh
|