Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   MatPlotLib.MatLab troubles (how to install/run matplotlib.PyLab?) (http://www.velocityreviews.com/forums/t341838-matplotlib-matlab-troubles-how-to-install-run-matplotlib-pylab.html)

Dr. Colombes 02-22-2005 12:56 AM

MatPlotLib.MatLab troubles (how to install/run matplotlib.PyLab?)
 
On my home laptop computer, I'm trying to install the appropriate
modules so that Python version 2.3.3 and IDLE version 1.0.2 (with an
"import matplotlib.matlab" statement) can produce nice MatLab-like
plots.

I have a matplotlib.matlab-capable Python set-up running OK on my
office desktop, which I obtained after downloading and installing a few
more modules (numarray and numeric, I think).

Now I get the following message about matplotlib.matlab being
deprecated:

-------------

matplotlib.matlab deprecated, please import matplotlib.pylab or simply
pylab instead. See http://matplotlib.sf.net/matplotlib_to_pylab.py
for a script which explains this change and will automatically convert
your python scripts that use matplotlib.matlab. This change was made
because we were concerned about trademark infringement on The
Mathwork's trademark of matlab.

---------------

Unfortunately, the above URL does not exist.

Thanks for suggestions, any help you can offer.


John Hunter 02-22-2005 02:06 AM

Re: MatPlotLib.MatLab troubles (how to install/runmatplotlib.PyLab?)
 
>>>>> "Colombes" == Colombes <DrColombes@yahoo.com> writes:

Colombes> matplotlib.matlab deprecated, please import
Colombes> matplotlib.pylab or simply pylab instead. See
Colombes> http://matplotlib.sf.net/matplotlib_to_pylab.py for a
Colombes> script which explains this change and will automatically
Colombes> convert your python scripts that use matplotlib.matlab.
Colombes> This change was made because we were concerned about
Colombes> trademark infringement on The Mathwork's trademark of
Colombes> matlab.

Colombes> Unfortunately, the above URL does not exist.

Oops -- that should be
http://matplotlib.sourceforge.net/matlab_to_pylab.py

In a nutshell, wherever you previously imported matplotlib.matlab you
can import matplotlib.pylab or equivalently, simply pylab

OLD:
from matplotlib.matlab import plot

NEW:
from pylab import plot

The script linked above will recursively search and replace these
strings for you in your scripts directory.

JDH

Dr. Colombes 02-22-2005 11:19 PM

Re: MatPlotLib.MatLab troubles (how to install/run matplotlib.PyLab?)
 

John Hunter wrote:
> >>>>> "Colombes" == Colombes <DrColombes@yahoo.com> writes:

>
> Colombes> matplotlib.matlab deprecated, please import
> Colombes> matplotlib.pylab or simply pylab instead. See
> Colombes> http://matplotlib.sf.net/matplotlib_to_pylab.py for a
> Colombes> script which explains this change and will

automatically
> Colombes> convert your python scripts that use matplotlib.matlab.
> Colombes> This change was made because we were concerned about
> Colombes> trademark infringement on The Mathwork's trademark of
> Colombes> matlab.
>
> Colombes> Unfortunately, the above URL does not exist.
>
> Oops -- that should be
> http://matplotlib.sourceforge.net/matlab_to_pylab.py
>
> In a nutshell, wherever you previously imported matplotlib.matlab you
> can import matplotlib.pylab or equivalently, simply pylab
>
> OLD:
> from matplotlib.matlab import plot
>
> NEW:
> from pylab import plot
>
> The script linked above will recursively search and replace these
> strings for you in your scripts directory.
>
> JDH



John:

Thanks for the help with the MatLab --> PyLab conversion.

Now I only need to figure out how to install the correct "Numeric"
module(s). I'm making progress, almost have my home laptop fully
capable with the MatLab-like (PyLab) graphs, plots.


John Hunter 02-23-2005 04:32 PM

Re: MatPlotLib.MatLab troubles (how to install/runmatplotlib.PyLab?)
 
>>>>> "Colombes" == Colombes <DrColombes@yahoo.com> writes:

Colombes> Now I only need to figure out how to install the
Colombes> correct "Numeric" module(s). I'm making progress,
Colombes> almost have my home laptop fully capable with the
Colombes> MatLab-like (PyLab) graphs, plots.

You can get either Numeric or numarray from
http://sourceforge.net/projects/numpy. matplotlib works transparently
with either (and provides a unified interface to both), but if you
choose numarray you need to change the "numerix" variable to numarray
in your matplotlib configuration file, which is described at
http://matplotlib.sf.net/.matplotlibrc

Good luck!
JDH



All times are GMT. The time now is 06:36 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.