473,396 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.

Jul 18 '05 #1
3 4001
>>>>> "Colombes" == Colombes <Dr********@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
Jul 18 '05 #2

John Hunter wrote:
>> "Colombes" == Colombes <Dr********@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.

Jul 18 '05 #3
>>>>> "Colombes" == Colombes <Dr********@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

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: scott | last post by:
I am trying to convert a python app that uses matplotlib to a standalone executable using py2exe. After running py2exe and executing my app I get the following stack trace: Traceback (most...
0
by: sturlamolden | last post by:
Recently, I have been trying to test Python as an alternative to Matlab. I have problems getting matplotlib to work on Windows (ActivePython 2.4.2). After installing the precompiled binary packages...
5
by: Enigma Curry | last post by:
I'm playing around with matplotlib for the first time. I'm trying to make a very simple histogram of values 1-6 and how many times they occur in a sequence. However, after about an hour of...
2
by: Grant Edwards | last post by:
I downloaded examples/contour_demo.py, and it doesn't run. I've searched both the user guide and the Wiki for "contour" and got zero hits. ...
0
by: spross | last post by:
hi all i have to use matplotlib on mac os x. on the official site of matplotlib, i found a link to precompiled python packages for mac os x: http://pythonmac.org/packages/py24-fat/index.html ...
12
by: orangeDinosaur | last post by:
Hi, I am exploring the possibility of using python as a replacement of MATLAB when I leave school. So, I've been playing with matplotlib and have run into some weird behavior after recently...
4
by: Bill Jackson | last post by:
Hi, I'm having some trouble plotting with the following matplotlibrc: text.usetex : True I tried clearing the cache files under ~/.matplotlib, but this did not help the problem. I'd post...
3
by: vajratkarviraj | last post by:
i hav python2.5, matplotlib0.90.1, and py2exe for python 2.5 all on windows xp... i hav a python program(letsc.py) which uses the matplotlib package... and i want 2 make an exe of it for distribution...
0
by: PamMish1982 | last post by:
Hi all, I have recently started using Python and I am trying to make a GUI out of Tkinter. I am using matplotlib for the graphic purposes. I have to make a exe file from this code. I use py2exe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.