To plot a line using pyplot.plot you need an array/list of x coordinates
and an array/list of y coordinates.

So if you have:

data = [[64, 13], [66, 22], [68, 9], [70, 11], [72, 8], [74, 10], [76, 11],
            [78, 8], [80, 9], [82, 9], [84, 15], [86, 13], [88, 5], [90,
9], [92, 13],
            [94, 12], [96, 7]]

You can get a list of xs and a list of ys with:

xs, ys = zip(*data)

>From that point, it is as simple as doing:

import matplotlib.pyplot as plt
plt.plot(xs, ys)


Hope that helps,

Phil






On 16 October 2012 09:39, ran...@0x06.net <ran...@0x06.net> wrote:

> [[64, 13], [66, 22], [68, 9], [70, 11], [72, 8], [74, 10], [76, 11],
> [78, 8], [80, 9], [82, 9], [84, 15], [86, 13], [88, 5], [90, 9], [92,
> 13], [94, 12], [96, 7]]
>
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to