Total noob question. How to start Matplotlib

Like the title of the post says, this is a totally noobie question. I have
an older system running Kubuntu 7.04 with Matplotlib 0.90.0 and for the life
of me, I can't figure out how to start the program.

Any help would be apprecieated. Once again, sorry for the Noob question of
the day.

Joe

···


View this message in context: http://www.nabble.com/Total-noob-question.--How-to-start-Matplotlib-tp23494234p23494234.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hello Homer (even if I would have rather called you with your proper name)

Like the title of the post says, this is a totally noobie question. I have
an older system running Kubuntu 7.04 with Matplotlib 0.90.0 and for the life
of me, I can't figure out how to start the program.

It seems you missed a "little" bit: matplotlib is not a program :slight_smile:

Matplotlib is a library you can use while programming in python to
generate graphs.

Let me give you a very simple example (I'll be using ipython, but take
the code and put it into the python interpreter or in a script and it
will work the same):

$ ipython
Python 2.5.4 (r254:67916, Feb 18 2009, 03:00:47)
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import matplotlib.pyplot as plt

In [2]: import numpy as np

In [3]: x = np.arange(0,2*np.pi,.01)

In [4]: y = np.sin(x**2)*np.exp(-x)

In [5]: plt.plot(x, y)
Out[5]: [<matplotlib.lines.Line2D object at 0x1ab5810>]

In [6]: plt.show()

I hope you'll find it interesting, and explore more about matplotlib.

Cheers,

···

On Tue, May 12, 2009 at 02:30, (_8*(l)Homer <letourneau.joe@...287...> wrote:
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi