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

Discussion in 'Python' started by Dr. Colombes, Feb 22, 2005.

  1. Dr. Colombes

    Dr. Colombes Guest

    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.
    Dr. Colombes, Feb 22, 2005
    #1
    1. Advertising

  2. Dr. Colombes

    John Hunter Guest

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

    >>>>> "Colombes" == Colombes <> 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 Hunter, Feb 22, 2005
    #2
    1. Advertising

  3. Dr. Colombes

    Dr. Colombes Guest

    John Hunter wrote:
    > >>>>> "Colombes" == Colombes <> 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.
    Dr. Colombes, Feb 22, 2005
    #3
  4. Dr. Colombes

    John Hunter Guest

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

    >>>>> "Colombes" == Colombes <> 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
    John Hunter, Feb 23, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?Sch=FCle_Daniel?=

    pylab, matplotlib ... roots function question

    =?ISO-8859-1?Q?Sch=FCle_Daniel?=, Jan 21, 2007, in forum: Python
    Replies:
    2
    Views:
    327
    Robert Kern
    Jan 22, 2007
  2. oyinbo55
    Replies:
    1
    Views:
    352
    three3q
    Jun 28, 2008
  3. Esmail
    Replies:
    0
    Views:
    229
    Esmail
    Apr 22, 2009
  4. Esmail
    Replies:
    3
    Views:
    829
    Esmail
    Apr 23, 2009
  5. bdb112
    Replies:
    2
    Views:
    2,568
    Carl Banks
    Oct 20, 2009
Loading...

Share This Page