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
(11) |
2
(1) |
3
(5) |
4
(25) |
5
(14) |
6
(36) |
7
(13) |
8
(15) |
9
|
10
(5) |
11
(5) |
12
(11) |
13
(15) |
14
(9) |
15
(16) |
16
(3) |
17
(13) |
18
(7) |
19
(9) |
20
(12) |
21
(2) |
22
(6) |
23
|
24
(2) |
25
(1) |
26
(16) |
27
(7) |
28
(11) |
29
(8) |
30
(1) |
I am trying to figure out how i can use IndexLocator with DateFormatter. Currently i am only using DayLocator and HourLocator in my code, but it is showing ticks for all hours in the plot, when I only care about plotting the hours for when data is available. I already applied date2num to my dates in the x list below. from matplotlib.dates import IndexDateFormatter, DateFormatter, date2num import matplotlib from matplotlib import rc import datetime from pylab import * x = [732559.39583333337, 732559.40625, 732559.41666666663, 732559.42708333337, 732559.4375, 732559.44791666663, 732559.45833333337, 732559.46875, 732559.47916666663 , 732559.48958333337, 732559.5, 732559.51041666663, 732559.52083333337, 732559.53125, 732559.54166666663, 732559.55208333337, 732559.5625, 732559.57291666663, 732559.58333333337, 732559.59375, 732559.60416666663, 732559.61458333337, 732559.625, 732559.63541666663, 732559.64583333337, 732559.65625, 732559.66666666663, 732560.39583333337, 732560.40625, 732560.41666666663, 732560.42708333337, 732560.4375, 732560.44791666663, 732560.45833333337, 732560.46875, 732560.47916666663, 732560.48958333337, 732560.5, 732560.51041666663, 732560.52083333337, 732560.53125, 732560.54166666663, 732560.55208333337, 732560.5625, 732560.57291666663, 732560.58333333337, 732560.59375, 732560.60416666663, 732560.61458333337, 732560.625, 732560.63541666663, 732560.64583333337, 732560.65625, 732560.66666666663] y = [13.07, 13.050000000000001, 13.029999999999999, 13.039999999999999, 13.029999999999999, 13.0, 13.0, 13.0, 13.0, 13.029999999999999, 13.02, 13.01, 12.99, 12.98, 12.98, 12.960000000000001, 12.94, 12.92, 12.960000000000001, 12.98, 13.19, 13.140000000000001, 13.130000000000001, 13.109999999999999, 13.08, 13.109999999999999, 13.039999999999999, 13.15, 13.130000000000001, 13.15, 13.279999999999999, 13.210000000000001, 13.199999999999999, 13.199999999999999, 13.19, 13.199999999999999, 13.140000000000001, 13.119999999999999, 13.1, 13.09, 13.130000000000001, 13.119999999999999, 13.130000000000001, 13.130000000000001, 13.140000000000001, 13.15, 13.16, 13.119999999999999, 13.119999999999999, 13.1, 13.050000000000001, 13.029999999999999, 13.02, 13.0] datesindex = range(len(x)) days = DayLocator() hours = HourLocator() ax = subplot(111) plot(x, y) ax.xaxis.set_major_locator(days) ax.xaxis.set_major_formatter(DateFormatter('%Y-%m-%d %H:%M:%S')) ax.xaxis.set_minor_locator(hours) ax.xaxis.set_minor_formatter(DateFormatter('%H:%M:%S')) setp(ax.get_xticklabels(), 'rotation', 90, 'horizontalalignment', 'center', fontsize=8) minorlabels = [tick.label1 for tick in ax.xaxis.get_minor_ticks()] setp(minorlabels, 'rotation', 90, 'horizontalalignment', 'center', fontsize=8) grid(True) show() Any suggestions would be greatly appreciated. -- Rick Albright Senior Quantitvative Analyst Indie Research, LLC 254 Witherspoon Street Princeton, NJ 08542 (609)497-1030 ral...@in...
http://matplotlib.sourceforge.net/faq.html#SHOW hth, Alan Isaac
Thanks in advance for the command name
matplotlib-0.87.5 is not compatible with python2.5. We are planning a minor rev bump tomorrow to address this. You can wait until then or trying building from svn. On 9/26/06, dj...@pd... <dj...@pd...> wrote: > I have installed Python 2.5 as a separate installation from 2.4, and am trying > to install matplotlib in the site-packages of the new version. I have installed > numpy and scipy successfully, but am having the following trouble when I try to > setup matplotlib. Any suggestions? > > thank you... > _________________________________________________________________________ > dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$ sudo > python2.5 setup.py build > GTK requires pygtk > TKAgg requires TkInter > GTKAgg requires pygtk > running build > running build_py > running build_ext > building 'matplotlib._agg' extension > C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall > -Wstrict-prototypes -fPIC > > compile options: '-Iagg23/include -Isrc -Iswig -I/usr/local/include/python2.5 > -c' > gcc: src/agg.cxx > cc1plus: warning: command line option "-Wstrict-prototypes" is valid for > Ada/C/ObjC but not for C++ > src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**, > swig_type_info*, int)': > src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*' > src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*, > swig_const_info*, swig_type_info**, swig_type_info**)': > src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*' > cc1plus: warning: command line option "-Wstrict-prototypes" is valid for > Ada/C/ObjC but not for C++ > src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**, > swig_type_info*, int)': > src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*' > src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*, > swig_const_info*, swig_type_info**, swig_type_info**)': > src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*' > error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall > -Wstrict-prototypes -fPIC -Iagg23/include -Isrc -Iswig > -I/usr/local/include/python2.5 -c src/agg.cxx -o > build/temp.linux-i686-2.5/src/agg.o" failed with exit status 1 > dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
hu...@ya... wrote: > But why the compatibility function is used? Not the new one from numpy? I > didn't ask for a Numeric compatibility? > I don't understand the need to have the Numeric function when I'm using numpy. The numerix layer is also used internally by matplotlib such that it does not need to have three different implementations to support the three array packages. It serves to be a uniform layer over the three packages, not just serve as a common place to get array functions from. That it is also exposed by importing everything from pylab is a side effect. If you don't want this, then you can configure ipython to import everything you want from numpy *after* pylab. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Hi, I want to write a program that will show up some graphs one by one automatically, but it turns out that I have to close the very first one manually (which is not what I want), then the following will show up automatically one by one. Any suggestions will be greatly appreciated. Best Regards, John from pylab import * a=[1,2,3,4,5] b=[1,2,3,4,5] c=[2,4,9,16,25] clf() plot(a,b) show() close() plot(a,c,'r') show() close() plot(a,c,'r') show() close()
But why the compatibility function is used? Not the new one from numpy? I=20 didn't ask for a Numeric compatibility? I don't understand the need to have the Numeric function when I'm using num= py. I think this is a bad "feature" perhaps not a bug but not the thing that th= e=20 majority of people would like. In my opinion, if numerix is define to be=20 numpy, all the function from numpy must be the default ones. In other hand= =20 that will confuse plenty of people.=20 Now I understand that I have to avoid all numerix function. The problem is= =20 that I love to use ipython -pylab and so I have to be more careful when I'm= =20 doing fast plot... N. Le mardi 26 septembre 2006 14:00, Eric Firing a =E9crit=A0: > It is not a bug in numerix; numerix is using an older version of where, > provided by numpy for compatibility with Numeric: > > In [4]:numpy.where? > Type: builtin_function_or_method > Base Class: <type 'builtin_function_or_method'> > String Form: <built-in function where> > Namespace: Interactive > Docstring: > where(condition, | x, y) > > The result is shaped like condition and has elements of x and y where > condition is respectively true or false. If x or y are not given, > then it is equivalent to condition.nonzero(). > > To group the indices by element, rather than dimension, use > > transpose(where(condition, | x, y)) > > instead. This always results in a 2d array, with a row of indices for > each element that satisfies the condition. > > > In [5]:pylab.where? > Type: function > Base Class: <type 'function'> > String Form: <function where at 0xb6e2a924> > Namespace: Interactive > File: > /usr/lib/python2.4/site-packages/numpy/oldnumeric/functions.py > Definition: pylab.where(condition, x, y) > Docstring: > <no docstring> > > > Eric > > hu...@ya... wrote: > > Hi, > > > > I think there are a bug in numerix. I was expecting the same result from > > pylab.where and numpy.where (in my matplotlibrc I have numerix define > > for numpy) but like you can see in the following example the result is > > quite different. > > > > N. > > > > > > > > > > Python 2.4.3 (#2, Apr 27 2006, 14:43:58) > > Type "copyright", "credits" or "license" for more information. > > > > IPython 0.7.3.svn -- An enhanced Interactive Python. > > ? -> Introduction to IPython's features. > > %magic -> Information about IPython's 'magic' % functions. > > help -> Python's own help system. > > object? -> Details about 'object'. ?object also works, ?? prints more. > > > > Welcome to pylab, a matplotlib-based Python environment. > > For more information, type 'help(pylab)'. > > > > In [1]: import numpy > > > > In [2]: a =3D numpy.arange(123) > > > > In [3]: pylab.where(a>23) > > -----------------------------------------------------------------------= =2D- > >-- exceptions.TypeError Traceback (most > > recent call last) > > > > /home/humufr/<ipython console> > > > > TypeError: where() takes exactly 3 arguments (1 given) > > > > In [4]: from matplotlib import rcParams > > > > In [5]: rcPara > > rcParams rcParamsDefault > > > > In [5]: rcParams['numerix'] > > Out[5]: 'numpy' > > > > In [6]: numpy.where(a>23) > > Out[6]: > > (array([ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, > > 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, > > 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, > > 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, > > 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, > > 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, > > 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, > > 115, 116, 117, 118, 119, 120, 121, 122]),) > > > > -----------------------------------------------------------------------= =2D- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > your opinions on IT & business topics through brief surveys -- and earn > > cash > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= =3DDEVDEV > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I have installed Python 2.5 as a separate installation from 2.4, and am t= rying to install matplotlib in the site-packages of the new version. I have ins= talled numpy and scipy successfully, but am having the following trouble when I = try to setup matplotlib. Any suggestions? thank you... _________________________________________________________________________ dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$ sudo python2.5 setup.py build GTK requires pygtk TKAgg requires TkInter GTKAgg requires pygtk running build running build_py running build_ext building 'matplotlib._agg' extension C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC compile options: '-Iagg23/include -Isrc -Iswig -I/usr/local/include/pytho= n2.5 -c' gcc: src/agg.cxx cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ src/agg.cxx: In function =91int SWIG_Python_ConvertPtr(PyObject*, void**, swig_type_info*, int)=92: src/agg.cxx:1231: error: invalid conversion from =91const char*=92 to =91= char*=92 src/agg.cxx: In function =91void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)=92: src/agg.cxx:27624: error: invalid conversion from =91const char*=92 to =91= char*=92 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ src/agg.cxx: In function =91int SWIG_Python_ConvertPtr(PyObject*, void**, swig_type_info*, int)=92: src/agg.cxx:1231: error: invalid conversion from =91const char*=92 to =91= char*=92 src/agg.cxx: In function =91void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)=92: src/agg.cxx:27624: error: invalid conversion from =91const char*=92 to =91= char*=92 error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Iagg23/include -Isrc -Iswig -I/usr/local/include/python2.5 -c src/agg.cxx -o build/temp.linux-i686-2.5/src/agg.o" failed with exit status 1 dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$
It is not a bug in numerix; numerix is using an older version of where, provided by numpy for compatibility with Numeric: In [4]:numpy.where? Type: builtin_function_or_method Base Class: <type 'builtin_function_or_method'> String Form: <built-in function where> Namespace: Interactive Docstring: where(condition, | x, y) The result is shaped like condition and has elements of x and y where condition is respectively true or false. If x or y are not given, then it is equivalent to condition.nonzero(). To group the indices by element, rather than dimension, use transpose(where(condition, | x, y)) instead. This always results in a 2d array, with a row of indices for each element that satisfies the condition. In [5]:pylab.where? Type: function Base Class: <type 'function'> String Form: <function where at 0xb6e2a924> Namespace: Interactive File: /usr/lib/python2.4/site-packages/numpy/oldnumeric/functions.py Definition: pylab.where(condition, x, y) Docstring: <no docstring> Eric hu...@ya... wrote: > Hi, > > I think there are a bug in numerix. I was expecting the same result from > pylab.where and numpy.where (in my matplotlibrc I have numerix define for > numpy) but like you can see in the following example the result is quite > different. > > N. > > > > > Python 2.4.3 (#2, Apr 27 2006, 14:43:58) > Type "copyright", "credits" or "license" for more information. > > IPython 0.7.3.svn -- An enhanced Interactive Python. > ? -> Introduction to IPython's features. > %magic -> Information about IPython's 'magic' % functions. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > Welcome to pylab, a matplotlib-based Python environment. > For more information, type 'help(pylab)'. > > In [1]: import numpy > > In [2]: a = numpy.arange(123) > > In [3]: pylab.where(a>23) > --------------------------------------------------------------------------- > exceptions.TypeError Traceback (most recent > call last) > > /home/humufr/<ipython console> > > TypeError: where() takes exactly 3 arguments (1 given) > > In [4]: from matplotlib import rcParams > > In [5]: rcPara > rcParams rcParamsDefault > > In [5]: rcParams['numerix'] > Out[5]: 'numpy' > > In [6]: numpy.where(a>23) > Out[6]: > (array([ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, > 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, > 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, > 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, > 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, > 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, > 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, > 115, 116, 117, 118, 119, 120, 121, 122]),) > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Le mardi 26 septembre 2006 16:29, John Hunter a =E9crit=A0: > I'm not sure what you are trying to do here. How about > > ax =3D subplot(111) > ax.plot([1,2,3], '-', label=3D'a line') > ax.legend() I don't know if it's a normal way with mpl, but with your example or with m= y=20 datas, the legend doesn't have a line beside the text, just the space for i= t.=20 If I use linestyle=3D'o', the marked is drawn. =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr
I successfully compiled numpy/scipy/mpl on my Intel mac (OS X 10.4.7 with gfortran) with the latest Universal MacPython 2.5. Everything went through without a hitch. I've been waiting for this for a while now (between desire for ctypes, and macpython 2.4 readline issues), and I am very happy to have it up and running. Thanks to everyone who makes this happen, -Rob ---- Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331
>>>>> "Lionel" == Lionel Roubeyrie <lro...@li...> writes: Lionel> Yes, I have seen my error too late, thanks. But I can't Lionel> get a line in the legend, just markers? I'm not sure what you are trying to do here. How about ax = subplot(111) ax.plot([1,2,3], '-', label='a line') ax.legend() JDH
Hi, I think there are a bug in numerix. I was expecting the same result from pylab.where and numpy.where (in my matplotlibrc I have numerix define for numpy) but like you can see in the following example the result is quite different. N. Python 2.4.3 (#2, Apr 27 2006, 14:43:58) Type "copyright", "credits" or "license" for more information. IPython 0.7.3.svn -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. Welcome to pylab, a matplotlib-based Python environment. For more information, type 'help(pylab)'. In [1]: import numpy In [2]: a = numpy.arange(123) In [3]: pylab.where(a>23) --------------------------------------------------------------------------- exceptions.TypeError Traceback (most recent call last) /home/humufr/<ipython console> TypeError: where() takes exactly 3 arguments (1 given) In [4]: from matplotlib import rcParams In [5]: rcPara rcParams rcParamsDefault In [5]: rcParams['numerix'] Out[5]: 'numpy' In [6]: numpy.where(a>23) Out[6]: (array([ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122]),)
Le mardi 26 septembre 2006 14:22, John Hunter a =E9crit=A0: > Make sure you pass in a list of strings, and not a single string. If > you have just a single string, it interprets it as a list of > characters. > > JDH Yes, I have seen my error too late, thanks. But I can't get a line in the legend, just markers? =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr
>>>>> "Lionel" == Lionel Roubeyrie <lro...@li...> writes: Lionel> Hi all, I have some minor problems with legend, but I Lionel> don't find how to figure out: - if the figure contains Lionel> only one plot, the text orientation of the legend is Lionel> vertical. How can I change this? - when plots are in '-' Lionel> style without markers, the lines are not shown in the Lionel> legend, I just have text. thanks -- Lionel Roubeyrie - Lionel> lro...@li... LIMAIR http://www.limair.asso.fr Make sure you pass in a list of strings, and not a single string. If you have just a single string, it interprets it as a list of characters. JDH s = 'mylabel' line, = plot(something) legend([line], [s]) Note the comma in "line, = plot(something)" which performs tuple unpacking of a list of lines. plot returns a list of lines, so you could also do lines = plot(something) legend(lines, [s]) but not lines = plot(something) legend(lines, s) because then you have a list of lines and a sequence of characters. JDH
Hi all, I have some minor problems with legend, but I don't find how to figure out: - if the figure contains only one plot, the text orientation of the legend is vertical. How can I change this? - when plots are in '-' style without markers, the lines are not shown in the legend, I just have text. thanks -- Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr