Drawing a zig-zag Trail in Python?

Discussion in 'Python' started by W. eWatson, Feb 5, 2010.

1. W. eWatsonGuest

I'd like to draw something like an animal track. Between each point is a
line. Perhaps the line would have an arrow showing the direction of
motion. There should be x-y coordinates axises. PIL? MatPlotLib, ??

W. eWatson, Feb 5, 2010

2. mkGuest

W. eWatson wrote:
> I'd like to draw something like an animal track. Between each point is a
> line. Perhaps the line would have an arrow showing the direction of
> motion. There should be x-y coordinates axises. PIL? MatPlotLib, ??

Pycairo?

mk, Feb 5, 2010

3. Jean-Michel PichavantGuest

mk wrote:
> W. eWatson wrote:
>> I'd like to draw something like an animal track. Between each point
>> is a line. Perhaps the line would have an arrow showing the direction
>> of motion. There should be x-y coordinates axises. PIL? MatPlotLib, ??

>
> Pycairo?
>

turtle

http://docs.python.org/library/turtle.html

Jean-Michel Pichavant, Feb 5, 2010
4. mkGuest

Jean-Michel Pichavant wrote:
> mk wrote:
>> W. eWatson wrote:
>>> I'd like to draw something like an animal track. Between each point
>>> is a line. Perhaps the line would have an arrow showing the direction
>>> of motion. There should be x-y coordinates axises. PIL? MatPlotLib, ??

>>
>> Pycairo?
>>

> turtle
>
> http://docs.python.org/library/turtle.html

It's in standard library, and therefore Not Cool.

<duck>

mk, Feb 5, 2010
5. Grant EdwardsGuest

On 2010-02-05, W. eWatson <> wrote:

> I'd like to draw something like an animal track. Between each
> point is a line. Perhaps the line would have an arrow showing
> the direction of motion. There should be x-y coordinates
> axises. PIL? MatPlotLib, ??

I'd probably use gnuplot-py, but I'm probably biased since I've
been using gnuplot since way before I learned Python.

--
Grant Edwards grante Yow! Hello, GORRY-O!!
at I'm a GENIUS from HARVARD!!
visi.com

Grant Edwards, Feb 5, 2010
6. W. eWatsonGuest

On 2/5/2010 9:30 AM, Grant Edwards wrote:
> On 2010-02-05, W. eWatson<> wrote:
>
>> I'd like to draw something like an animal track. Between each
>> point is a line. Perhaps the line would have an arrow showing
>> the direction of motion. There should be x-y coordinates
>> axises. PIL? MatPlotLib, ??

>
> I'd probably use gnuplot-py, but I'm probably biased since I've
> been using gnuplot since way before I learned Python.
>

It appears this is easier than I thought. MLB's plot will do it. I can
put arrows at the end of a line, and even use sleep to watch the path
slowly evolving.

W. eWatson, Feb 6, 2010