SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Jon P. <Jon...@no...> - 2004年11月30日 10:01:18
Actually, since it's the package that most users probably actually want, 
would it be more suitable to move matplotlib.matlab into matplotlib 
itself? Then we could simply
import matplotlib
Obviously that would mix the main user routines (plot()...) with the 
more administrative namespace (get_backend(), is_interactive()...) and 
maybe you'd want to move those into a separate (always imported) 
subpackage along the lines of matplotlib.res?
Just an idea.
Jon
>To: mat...@li...
>From: John Hunter <jdh...@ac...>
>Date: 2004年11月29日 17:23:04 -0600
>Subject: [Matplotlib-users] matlab (TM)
>
>
>I'm concerned that at some point down the road, The Mathworks may not
>like the fact that matplotlib uses the name matlab, which is
>trademarked. I think I'll rename the matlab interface to pylab. In
>some sense, this name is more appropriate any way, because I'd like to
>incorporate the best features of IDL, gnuplot and python, while still
>retaining and enhancing core matlab compatibility. I emailed Travis,
>who previously used pylab.sf.net before it became part of scipy, and
>he didn't have a problem with our using this name. And Fernando
>already uses pylab as the option to ipython to make ipython support
>matplotlib.
>
>So my plan is to change the name of the matplotlib.matlab module to
>matplotlib.pylab, but wanted propose this here first since this will
>effect almost every script. It should be an easy search and replace
>operation, and I'll probably post a little python script to
>recursively replace all matplotlib.matlab references in a given
>directory with matplotlib.pylab, since I have a few directories myself
>that will need to be renamed.
>
>Comments or objections welcome.
>
>JDH
>
-- 
Jon Peirce
http://www.psychology.nottingham.ac.uk/staff/jwp/
This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
From: Darren D. <dd...@co...> - 2004年11月30日 10:09:06
> Actually, since it's the package that most users probably actually want,
> would it be more suitable to move matplotlib.matlab into matplotlib
> itself? Then we could simply
>
> import matplotlib
>
> Obviously that would mix the main user routines (plot()...) with the
> more administrative namespace (get_backend(), is_interactive()...) and
> maybe you'd want to move those into a separate (always imported)
> subpackage along the lines of matplotlib.res?
>
> Just an idea.
> Jon
>
That would introduce some problems if the user wanted to change rc settings, 
which currently has to be done before importing matplotlib.matlab.
-- 
Darren
From: Chris B. <Chr...@no...> - 2004年11月30日 18:58:15
Jon Peirce wrote:
> Actually, since it's the package that most users probably actually want, 
most, maybe, but not all.
> would it be more suitable to move matplotlib.matlab into matplotlib 
> itself? Then we could simply
> 
> import matplotlib
please don't' do that. I haven't done much with it yet, but I'm much 
more interested in using the pythonesque api than the matlabesque one. 
I'm not using Matlab for a reason.
-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...> - 2004年12月01日 04:43:10
>>>>> "Jon" == Jon Peirce <Jon...@no...> writes:
 Jon> Actually, since it's the package that most users probably
 Jon> actually want, would it be more suitable to move
 Jon> matplotlib.matlab into matplotlib itself? Then we could
 Jon> simply
 Jon> import matplotlib
 Jon> Obviously that would mix the main user routines (plot()...)
 Jon> with the more administrative namespace (get_backend(),
 Jon> is_interactive()...) and maybe you'd want to move those into
 Jon> a separate (always imported) subpackage along the lines of
 Jon> matplotlib.res?
It is technically possible to reorganize the code to support this, but
it would break a lot of code in a nontrivial way. While it is trivial
to search and replace instances of 'from matplotlib.matlab' with 'from
matplotlib.pylab' and so on, it would not be trivial to port scripts
that were using the matplotlib admin funcs after the kind of
reorganization this would entail.
But your post did give me an idea that might satisfy everyone and
provide the ease of use your idea suggests. If we migrate
matplotlib.matlab to matplotlib.pylab as discussed, *and* add an
additional file pylab.py that resides in site-packages and is a one
liner
 from matplotlib.pylab import * 
then we preserve the easy conversion from old namespace to new
namespace while making it easy for script writers to do
 from pylab import *
Plea to distutils gurus: if you can figure out a way in the current
matplotlib setup.py setup to get a module named pylab.py into
site-packages, please advise! The current module layout is somewhat
complicated and already stretches my distutils capabilities.
Of course if you were using Fernando's wonderful pylab feature in
ipython, it would be a trifle concern anyhow, since the import is done
automagically.
JDH
From: Andrew S. <str...@as...> - 2004年12月02日 02:30:54
John Hunter wrote:
>Plea to distutils gurus: if you can figure out a way in the current
>matplotlib setup.py setup to get a module named pylab.py into
>site-packages, please advise! The current module layout is somewhat
>complicated and already stretches my distutils capabilities.
> 
>
I wouldn't call myself a distutils guru, but is this what you mean?
#!/usr/bin/env python
from distutils.core import setup
setup(py_modules=['pylab'],
 package_dir = {'':'path/to/where/pylab.py/source/is/located'})
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /