Hi Neal,

I always followed what has been written here:

http://matplotlib.org/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related

And they said,

------------------
Matplotlib, pylab, and pyplot: how are they related?

Matplotlib is the whole package; pylab is a module in matplotlib that
gets installed alongside matplotlib; andmatplotlib.pyplot is a module
in matplotlib.

Pyplot provides the state-machine interface to the underlying plotting
library in matplotlib. This means that figures and axes are implicitly
and automatically created to achieve the desired plot. For example,
calling plot from pyplot will automatically create the necessary
figure and axes to achieve the desired plot. Setting a title will then
automatically set that title to the current axes object:

import matplotlib.pyplot as plt

plt.plot(range(10), range(10))
plt.title("Simple Plot")
plt.show()

Pylab combines the pyplot functionality (for plotting) with the numpy
functionality (for mathematics and for working with arrays) in a
single namespace, making that namespace (or environment) even more
MATLAB-like. For example, one can call the sin and cos functions just
like you could in MATLAB, as well as having all the features of
pyplot.

The pyplot interface is generally preferred for non-interactive
plotting (i.e., scripting). The pylab interface is convenient for
interactive calculations and plotting, as it minimizes typing. Note
that this is what you get if you use the ipython shell with the -pylab
option, which imports everything from pylab and makes plotting fully
interactive.
------------------


-Shawn

On Thu, May 1, 2014 at 2:16 AM, Michiel de Hoon <mjldeh...@yahoo.com> wrote:
> 99.9% of the time I am using pyplot, as it usually does what I want without 
> me having to understand an api.
> I don't care so much if pyplot agrees with matlab or not, but it should be 
> something easy that new users can pick up quickly.
>
> Best,
> -Michiel
>
> --------------------------------------------
> On Wed, 4/30/14, Neal Becker <ndbeck...@gmail.com> wrote:
>
>  Subject: [Matplotlib-users] Which api to learn?
>  To: matplotlib-users@lists.sourceforge.net
>  Date: Wednesday, April 30, 2014, 7:49 AM
>
>  I've never used matlab (and hope
>  never to have to).  But I've been using pyplot
>  api for mpl for quite a while.
>
>  Is there any good reason to move to the "native" mpl api and
>  drop pyplot?  I ask
>  because as I understand, pyplot is intended as a matlab
>  workalike, and since I
>  never learned matlab I have no need for that crutch.
>  OTOH, I'm quite used to
>  the pyplot api at this point.
>
>
>  
> ------------------------------------------------------------------------------
>  "Accelerate Dev Cycles with Automated Cross-Browser Testing
>  - For FREE
>  Instantly run your Selenium tests across 300+ browser/OS
>  combos.  Get
>  unparalleled scalability from the best Selenium testing
>  platform available.
>  Simple to use. Nothing to install. Get started now for
>  free."
>  http://p.sf.net/sfu/SauceLabs
>  _______________________________________________
>  Matplotlib-users mailing list
>  Matplotlib-users@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.  Get
> unparalleled scalability from the best Selenium testing platform available.
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-- 
Yuxiang "Shawn" Wang
Gerling Research Lab
University of Virginia
yw...@virginia.edu
+1 (434) 284-0836
https://sites.google.com/a/virginia.edu/yw5aj/

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to