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
(13) |
2
(11) |
3
(2) |
|
4
(4) |
5
(28) |
6
(17) |
7
(28) |
8
(6) |
9
(6) |
10
|
|
11
|
12
(9) |
13
(13) |
14
(21) |
15
(16) |
16
(6) |
17
(3) |
|
18
(3) |
19
(8) |
20
(15) |
21
(33) |
22
(10) |
23
(17) |
24
(2) |
|
25
(5) |
26
(23) |
27
(18) |
28
(6) |
|
|
|
|
From: Gary P. <pa...@in...> - 2007-02-20 16:27:49
|
On 2/19/07, Andrew Straw <str...@as...> wrote: > Dear Gary, "_ns" is the numpy backend. Do you have numpy installed? yes, from svn > Is it working? it seems to be. Nothing I use is broken. Everything I've tried works. >Are you compiling matplotlib from source? yes, version 0.90, the released sourceforge tarball > What version of > Ubuntu are you using (Dapper? Edgy?) Kubuntu Edgy. 6.10. Python 2.4.7 numpy 1.0.2.dev3546 > > Gary Pajer wrote: > > [sorry if this appears more than once. The list manager is timing out > > when I try to change my email address, so I can't tell if it has taken > > effect] > > > > No_module_named _ns_backend_agg > > > > I've set to True everything in setupext.py that had agg in it. > > > > This is my first time building on ubuntu. > > I spent lots of time chasing down dependencies, and there are no > > errors during the build. Help please? > > > > TIA, > > gary > > > > ------------------------------------------------------------------------- > > 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 > > > > |
|
From: Edin S. <edi...@gm...> - 2007-02-20 12:03:21
|
Hi Damian, For the users_guide.tex see: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/users_guide/users_guide.tex?view=log You can checkout the SVN dir where the users guide is located at: https://svn.sourceforge.net/svnroot/matplotlib/trunk/users_guide Best, Edin On 2/20/07, Damian McGuckin <da...@es...> wrote: > > Where can I find the master TeX document for 0.90? I'd like to make some > corrections, and maybe add things. > > Thanks - Damian > > Pacific Engineering Systems International, 277-279 Broadway, Broadway NSW 2007 > Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here ! > Views and opinions here are mine and not those of any past or present employer |
|
From: Damian M. <da...@es...> - 2007-02-20 10:01:17
|
Where can I find the master TeX document for 0.90? I'd like to make some corrections, and maybe add things. Thanks - Damian Pacific Engineering Systems International, 277-279 Broadway, Broadway NSW 2007 Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here ! Views and opinions here are mine and not those of any past or present employer |
|
From: Andrew S. <str...@as...> - 2007-02-20 04:17:48
|
Dear Gary, "_ns" is the numpy backend. Do you have numpy installed? Is it working? Are you compiling matplotlib from source? What version of Ubuntu are you using (Dapper? Edgy?) Gary Pajer wrote: > [sorry if this appears more than once. The list manager is timing out > when I try to change my email address, so I can't tell if it has taken > effect] > > No_module_named _ns_backend_agg > > I've set to True everything in setupext.py that had agg in it. > > This is my first time building on ubuntu. > I spent lots of time chasing down dependencies, and there are no > errors during the build. Help please? > > TIA, > gary > > ------------------------------------------------------------------------- > 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 > |
|
From: tritemio <tri...@gm...> - 2007-02-19 22:36:32
|
Hi to the list, this is my first post on this mailing list. I'm searching to apply a colormap to a 3d surface plotted with plot_surface. I've seen in the simple3d.py example that the colormap can be applied and properly scaled though the set_array() method of the object returned by plot_surface. However, I didn't find a way to assign the colormap to a particular axis: in my case (and probably this is the most common case) I want to apply the colormap the the Z axis. Can anyone indicate me how to apply the colormap to a specific axis (in particular the Z axis)? I'm currently using matplotlib 0.87 on debian etch and ubuntu dapper, but I'm thinking to try the 0.9 release ASAP. Thanks for any help. ~ Antonio -- View this message in context: http://www.nabble.com/howto-plot_surface-with-z-axis-colormap-tf3255620.html#a9051050 Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Gary P. <pa...@in...> - 2007-02-19 21:44:22
|
[sorry if this appears more than once. The list manager is timing out when I try to change my email address, so I can't tell if it has taken effect] No_module_named _ns_backend_agg I've set to True everything in setupext.py that had agg in it. This is my first time building on ubuntu. I spent lots of time chasing down dependencies, and there are no errors during the build. Help please? TIA, gary |
|
From: Samuel M. S. <sm...@sa...> - 2007-02-19 20:23:56
|
> >> which versions of wxPython are supported? > > I haven't tried the new one, but the last release worked well with > wxPython2.6.3, but had some issues with 2.8.* -- I don't think anyone > has addressed those yet. > Just to confirm, the binary posted at the following http://downloads.sourceforge.net/matplotlib/matplotlib-0.90.0-py2.5- macosx-10.4-fat.egg?modtime=1171118530&big_mirror=0 was compiled to work with wxPython 2.6 but may work with wxPython 2.8? Shouldn't the version of wxPython also get included in the name along with the python version and os version? Sam |
|
From: Ryan K. <rya...@gm...> - 2007-02-19 19:09:02
|
I need to generate a drawing of a robot that is essentially a serial connection of lines in 3D. I have been trying to use the recipe at http://www.scipy.org/Cookbook/Matplotlib/mplot3D This I think would work. The only drawback is that I would like to adjust the thickness of the lines drawn. Trying to pass a kwarg of linewidth=2.0 doesn't work. Can a wireframe with a thick line be drawn easily with matplotlib? Thanks, Ryan |
|
From: WolfgangZillig <wo...@gm...> - 2007-02-19 18:03:54
|
Hi Alex, I don't know if it can be done with matplotlib, but for drawing meshes and so on I use vtk http://public.kitware.com/VTK/ On that page are also examples how to do that job, just search for "vtkUnstructuredGrid" or "vtkStructuredGrid" depending on your mesh. Hope that helps. Wolfgang ale...@fr... schrieb: > Hello, > > I want to use matplotlib to visualize of 2 dimensional mesh (more particulary > adataptive mesh, it looks like this : > http://www.cita.utoronto.ca/~ljdursi/research/curve-region-oct.png). > It consists of a square or a rectangle splitted in square of the same area, each > square can be divided in four over squares and one or more of these four over > squares can be divided in four over squares ... (and this process is achieved > recursively depends of your refinement level). > I have a list which contains the coordinates of the center of each squares and I > want to use these points do draw the mesh. I tried to use matplotlib with > meshgrid > to display the mesh like in the link given before but I didn't succeeded. > > My questions are : > > Is matplotlib the right library to do this ? and for a positive answer how I can > do it ? > > Thanks > > Alex > > > ------------------------------------------------------------------------- > 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 |
|
From: Matthias M. <Mat...@gm...> - 2007-02-19 12:32:50
|
Hello everybody, I would like to open and close some figures during the mainloop or (if this is not possible) set figures to some kind of active or visible. Could anyone help me or give me a hint? Thanks in advance, Matthias |
|
From: Martin R. <law...@gm...> - 2007-02-19 12:16:18
|
Hello Belinda, I just stumbled over the same problem. The following will give what you (we) want: [x.num for x in matplotlib._pylab_helpers.Gcf.get_all_fig_managers()] Bye, Martin |
|
From: Barry W. <bar...@gm...> - 2007-02-19 00:03:44
|
Matt, Yes, I agree. I wasn't coming at so much from the goal of making Pylab a Matlab clone (as you point out, that's silly, and misses much of the advantage of Python), but rather from the goal of making interactive use as efficient as possible. When I fire up ipython -pylab to do some quick exploration, it's nice not to have to type N.blah or pylab.plot etc. If I just import pylab *, however, then the commands I use may not be what I expect from more formal coding where I use N.blah numpy, S.foo for scipy, and pylab.bar for matplotlib. Making it easy for users to have either namespace strategy, with consistent bindings, ala the start of this thread is a good idea, IMO. Well, I've said my piece. I'll get out of the way and let others have a crack... Barry On 2/18/07, Matthew Brett <mat...@gm...> wrote: > Hi, > > > import plab > > > > plab.plot() #etc. > > > > and interactive use could do from plab import *. > > Yes... It's a hard call of course. I am a long term matlab user, and > switched to python relatively recently. I do see the attraction of > persuading people that you can get something very similar to matlab > easily. The downside about making numpy / python like matlab is that > you soon realize that you really have to think about your problems > differently, and write code in a different way. I know that's > obvious, but the variables as pointers, mutable / immutable types, > zero based indexing, arrays vs matrices are all (fruitful) stumbling > blocks. Then there is the very large change of thinking in an OO way, > pulling in other large packages for doing other tasks, writing > well-structured code with tests - all the features that python gives > you for an industrial strength code base. And, the more pylab looks > like matlab, the more surprised and confused people will be when they > switch. So, I would argue that getting as close to matlab as > possible should not be the unqualified goal here - it is a real > change, with real pain, but great benefits. > > Best, > > Matthew > > ------------------------------------------------------------------------- > 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 > |
|
From: Neal B. <ndb...@gm...> - 2007-02-18 18:15:20
|
I have never used matlab, but a lot of my colleagues do. Can anyone give me some good references that I could show them to explain the advantages of python over matlab? |
|
From: Matthew B. <mat...@gm...> - 2007-02-18 11:46:58
|
Hi, > import plab > > plab.plot() #etc. > > and interactive use could do from plab import *. Yes... It's a hard call of course. I am a long term matlab user, and switched to python relatively recently. I do see the attraction of persuading people that you can get something very similar to matlab easily. The downside about making numpy / python like matlab is that you soon realize that you really have to think about your problems differently, and write code in a different way. I know that's obvious, but the variables as pointers, mutable / immutable types, zero based indexing, arrays vs matrices are all (fruitful) stumbling blocks. Then there is the very large change of thinking in an OO way, pulling in other large packages for doing other tasks, writing well-structured code with tests - all the features that python gives you for an industrial strength code base. And, the more pylab looks like matlab, the more surprised and confused people will be when they switch. So, I would argue that getting as close to matlab as possible should not be the unqualified goal here - it is a real change, with real pain, but great benefits. Best, Matthew |
|
From: Barry W. <bar...@gm...> - 2007-02-18 07:41:18
|
Perhaps we should consider two use cases: interactive use ala Matlab and larger code bases. In the first case, being able to import * saves a lot of typing and the namespace polution problem isn't a big deal. The second use, obviously, benefits from avoiding import *. Returning to the OP's questions, why couldn't both cases be helped by creating a "meta-package" for numpy, scipy, and matplotlib? For the sake of argument, lets call the package "plab". Existing code could be affected by changing the individual packages, but a package that essentially does from pylab import * from numpy import * from scipy import * would give a standard API that future code and interactive use could use. Code could do import plab plab.plot() #etc. and interactive use could do from plab import *. Just a thought... Barry On 2/16/07, Matthew Brett <mat...@gm...> wrote: > Hi, > > > I think a consensus is building in the python community that you should > > NEVER use import *! > > Well, I have only been coding python for a few years, but I would say, > along with writing unit tests, the great importance of not using > import * is one of the secrets that you learn slowly and painfully > with experience. Chris' point about the movement of big projects away > from that idiom is a very good one. It is convenient, but over time > you realize that the value of convenience is far outweighed by the > namespace mess and loss of clarity that results. > > Best, > > Matthew > > ------------------------------------------------------------------------- > 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 > |
|
From: Damian M. <da...@es...> - 2007-02-17 22:58:51
|
The problem was the OpenSuSE 10.1 pre-built RPM. Rebuilt a release from the latest 0.90 source and it works. Thanks - Damian Pacific Engineering Systems International, 277-279 Broadway, Broadway NSW 2007 Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here ! Views and opinions here are mine and not those of any past or present employer |
|
From: <ale...@fr...> - 2007-02-17 15:34:29
|
Hello, I want to use matplotlib to visualize of 2 dimensional mesh (more particulary adataptive mesh, it looks like this : http://www.cita.utoronto.ca/~ljdursi/research/curve-region-oct.png). It consists of a square or a rectangle splitted in square of the same area, each square can be divided in four over squares and one or more of these four over squares can be divided in four over squares ... (and this process is achieved recursively depends of your refinement level). I have a list which contains the coordinates of the center of each squares and I want to use these points do draw the mesh. I tried to use matplotlib with meshgrid to display the mesh like in the link given before but I didn't succeeded. My questions are : Is matplotlib the right library to do this ? and for a positive answer how I can do it ? Thanks Alex |
|
From: Damian M. <da...@es...> - 2007-02-17 07:23:45
|
With a backend configured to be TkAgg, I get the following error on
startup, i.e. on doing ...
$ python
Python 2.4.2 (#1, May 2 2006, 08:13:46)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pylab import *
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/pylab.py", line 1, in ?
from matplotlib.pylab import *
File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 220,
in ?
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "/usr/lib/python2.4/site-packages/matplotlib/backends/__init__.py",
line 23, in pylab_setup
globals(),locals(),[backend_name])
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py",
line 8, in ?
import tkagg # Paint image to Tk photo blitter
extension
File "/usr/lib/python2.4/site-packages/matplotlib/backends/tkagg.py",
line 1, in ?
import _tkagg
ImportError: No module named _tkagg
>>>
Can anybody tell me what have I forgotten?
I have the following RPMs installed
agg-2.4-15.3
quagga-0.98.5-17.5
python-matplotlib-0.87.7-0.pm.1
python-qt-3.5.1-19
python-opengl-2.0.1.09-20
python-doc-pdf-2.4.2-16
python-numeric-24.2-14
python-tk-2.4.2-18
python-openssl-0.6-17
libxml2-python-2.6.23-15
python-logilab-common-0.13.0-14
python-cairo-1.0.2-14
pythoncad-DS1_R27-15
python-numpy-1.0.1-0.pm.1
python-2.4.2-18
python-elementtree-1.2.6-18
python-imaging-1.1.5-17
python-idle-2.4.2-18
python-urlgrabber-2.9.7-15
python-gdbm-2.4.2-18
python-pyx-0.8.1-14
python-gtk-2.8.2-21
kdebindings3-python-3.5.1-19
rpm-python-4.4.2-40
subversion-python-1.3.0-20
By the way, I can reset the backend to 'Agg' and do
from pylab import *
t = arange(10)
plot(t, t * t)
savefig('example.png')
and this works.
Thanks - Damian
Pacific Engineering Systems International, 277-279 Broadway, Broadway NSW 2007
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here !
Views and opinions here are mine and not those of any past or present employer
|
|
From: Edin S. <edi...@gm...> - 2007-02-16 19:10:02
|
On 2/16/07, Chiara Caronna <chi...@ho...> wrote: > Hello, > I would like to plot some data while the interpreter continues > calculating... > if I just write > plot(x,y) > show() > > Then the code stops until I close the window... how should I do? > Thanks in advance > Chiara Hi Chiara, Try setting interactive : True in your matplotlibrc file See: http://matplotlib.sourceforge.net/matplotlibrc http://matplotlib.sourceforge.net/interactive.html HTH, Edin |
|
From: Benoit D. <do...@in...> - 2007-02-16 14:12:59
|
Hi, > Then the code stops until I close the window... how should I do? This is normal behavior as, I guess, your program is single-threaded. What you want is some concurrency during the execution (computing and =20= plotting). You should look at multi-threading programming in Python. You could =20 have a look here: http://www.devshed.com/c/a/Python/Basic-Threading-=20 in-Python/ for further details on thread in Python. Benoit > Thanks in advance > Chiara > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN Search! > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 Louvain-la-Neuve Belgium Phone: +32 10 47 87 18 Home page: http://www.info.ucl.ac.be/~donnet |
|
From: Chiara C. <chi...@ho...> - 2007-02-16 13:43:29
|
Hello, I would like to plot some data while the interpreter continues calculating... if I just write plot(x,y) show() Then the code stops until I close the window... how should I do? Thanks in advance Chiara _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ |
|
From: Matthew B. <mat...@gm...> - 2007-02-16 09:48:58
|
Hi, > I think a consensus is building in the python community that you should > NEVER use import *! Well, I have only been coding python for a few years, but I would say, along with writing unit tests, the great importance of not using import * is one of the secrets that you learn slowly and painfully with experience. Chris' point about the movement of big projects away from that idiom is a very good one. It is convenient, but over time you realize that the value of convenience is far outweighed by the namespace mess and loss of clarity that results. Best, Matthew |
|
From: Evan M. <eva...@gm...> - 2007-02-16 01:30:14
|
> How do I make a second x-axis? I am looking for something like "twinx" (a "twiny" would be perfect...)Thanks, Evan > > ------------------------------------------------------------------------- > 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 > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > I just noticed this was posted on the 13 Feb; funny it doesn't show up in a search for 'twiny'. The answer is there anyway. -Evan |
|
From: Christopher B. <Chr...@no...> - 2007-02-16 00:59:45
|
Keir Mierle wrote: > I do not want to descend into a huge, time wasting discussion of this > which is not productive. Well, it's been said before, and this isn't really the place for it, but it's quite critical to your project. Don't let any of this get in the way of improving docs strings, however! > Note that I am not suggesting a recursive import of submodules. What you appeared to support was that all of the matplotlib, numpy and scipy base namespaces be merged, and they should all be merged into the main namespace. >> import matplotlib as plot >> import numpy as N >> import Scipy.whatever as whatever. > > UGH. See, this is my issue. When I read someone else's code, they always > chose a different convention. Good point, that is a bit of a pain. It would certainly be a good idea to standardize at least these three, and have them be imported by default in your environment (though I'm not sure about scipy -- numpy and matplotlib would be good) > If we define the official way to use pylab as 'from pylab import *', > then these problems vanish. and others arise. One is that you then have to make sure you don't' get any name clashes you don't want, so you end up with arange, so it won't clash with range. etc. > Note that we must be *very* careful to export only > exactly the names which should be exported; Then how do you get the others? "import *" and "import pylab"? > Because it is always the case > that I use numpy and pylab together. I use numpy every day without pylab. And I use pylab occasionally without numpy, it accepts regular old lists for quick hacking. This is a key point -- if all anyone does is use your mega-pylab, then you may be right, but let's not cripple people. Let them start using PyLab for matlab-like quickie coding, then decide to write a real app, and be able to start using wxPython without learning a bunch of new stuff, and having namespaces clash. > Other non-core modules should be > treated as usual, where it is at the author's discretion for how to import them. Everyone's idea of non-core is different Even if you insist on joining numpy and plotting namespaces (they are both too big at the moment, if you ask me), please tell people to import it as: import pylab I think a consensus is building in the python community that you should NEVER use import *! some history: wxPython used to be commonly used as: from wxpython import * And the names were all: wxSomeName. A few years back, the names were all changed to remove the wx, and we now all do: import wx this = wx.SomeName(...) Numeric was designed to be used with "import *". Now many of the old Numeric functions are available as numpy methods, and more and more people are using some variation of: import numpy as N and fewer are using "import *" Does anyone else have any other examples? One more reason: more IDEs are providing auto-completion and module browsers. Smaller, more hierarchical namespaces are much better for this. I know if I'm looking for a number crunching or a plotting function -- make it easier to find them. > I think Scott Meyer, a C++ luminary, said it best [1] when this heinous > fragment of his code was posted in comp.lang.c++.moderated namespaces are a new add-on to C++ -- it will be a good while before they are used right there! > This is only for the core functionality. The scipy/numpy/matplotlib core > API becomes similar in importance to Python's __builtins__ for the PyLab > environment. >>> len(dir(__builtins__)) 129 >>> len(dir(pylab)) 432 and __builtins__ is too big as it is. -- 31 of those are Exceptions, they should have their own namespace, if you ask me. Would it be that much harder to type except Errors.Type: than except TypeError: > I argue that Python's __builtins__ should be equivalent to PyLab's from > pylab > import *, and that e.g. import sys corresponds to import linalg. But then you have __builtins__ and pylab in the same namespace! > Perhaps non-interactively; when using the system interactively the MATLAB > interface is by far the best way to go. If someone proposes an oo interface > which is as fast to type and as easy to understand as the MATLAB interface > (i.e. to demo to my friends who came over to see what I'm talking about > when I > say that PyLab is great) then I'm all ears. Look for my (and other) posts about this for more detail, but a few points: 1) Don't break long-term productivity/useability so that the quicky demos are more impressive. Python's real strength over tools like Matlab shows up when projects get bigger. 2) There is nothing about an OO interface that is inherently harder to use, or even more typing, except perhaps a few extra dots. 3) There is some work to be done to bring the matplotlib OO interface up to its potential for interactive use, particularly the docs! > Note that this discussion is early! I am waaaay not here yet; first step > is to fix the docstrings. Yes, enough said for now -- and I really appreciate your efforts to clean up the docstrings. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: David L G. <Dav...@no...> - 2007-02-15 23:46:20
|
One more thing: knowing Chris, I *think* that he wasn't saying that you should somehow *oblige* the coder to use namespace prefices, rather, don't do anything that would make it harder or less efficient to do so, right Chris? DG Christopher Barker wrote: > Keir Mierle wrote: > >> p.s. This is part of my plan to kick off http://scipy.org/PyLab >> > > Great Plan, and I think kicking it off with better docstrings is a good > start. > > One comment, from your Wiki Page: > > """ > I feel strongly that the correct way to import the entire core PyLab API > should be via > > from pylab import * > """ > > No, no, no, no NO! > > see, I feel strongly too ;-). > > You are trying to build something that is better than MATLAB. The one > way you are almost guaranteed to achieve that is that it is built on the > Python language, which is much more powerful and flexible than Matlab, > but you know that already. > > However, you are tossing away a lot of the advantage if you don't keep > the focus on being pythonic, and that means, in this case: > > "Namespaces are one honking great idea -- let's do more of those!" > > note, NOT "fewer of those" > > numpy + matplotlib + scipy > > is a LOT of functionality. It should not be all in the same namespace. > It's really not that hard to do something like: > > import matplotlib as plot > import numpy as N > import Scipy.whatever as whatever. > > I think it's very helpful to keep things clean and separated. Sure, you > can work to remove duplication an name clashes among these three > packages, but what if the user decides they also need PIL, or PyGame, or > PyNetCDF, etc, etc. One of the real powers of Python is that it has > broad use, and that there is a module for just about everything you need > to do, all maintained by others -- you are guaranteed name clashes if > you don't use namespaces -- that's what they are for. > > Note python itself. A lot of common functionality is in modules you need > to import: sys, os, sys.path, string (though string methods remove much > of that need) This is a GOOD model! > > Also, I'd really like to see far more use of an OO approach in > matplotlib use (and maybe scipy -- I haven't used much of it). If you > note, numpy has made lots of things ndarray methods that were functions > in Numeric -- this makes NOT using "import *" much cleaner. > > In short: I think your goals are great, most of your approach is good, > but please: Keep PyLab pythonic -- don't try to make it more like > matlab, or fortran, or any other language -- your users will thank you > for it later! > > See recent discussions on the matplotlib list about this topic. I think > even John is shifting toward wanting more use of the OO interface. > > -Chris > > > > > > > > > > > > > > > > > -- ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/> |