Deutsch   English   Français   Italiano  
<ln9bflFp0saU2@mid.individual.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com>
Newsgroups: comp.lang.python
Subject: Re: Old matplotlib animation now fails
Date: 16 Oct 2024 08:23:17 GMT
Organization: @ Home
Lines: 47
Message-ID: <ln9bflFp0saU2@mid.individual.net>
References: <ln80t9Fj0i0U1@mid.individual.net>
 <2136e51b-c556-4bb3-bcb3-d7299ae80be5@mrabarnett.plus.com>
 <mailman.25.1729035669.4695.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 0lJ+P/T2ONq/tQJwKcVStAHZNv0dFBINKNyuvKrJwATREJzcEJ
Cancel-Lock: sha1:hDoHuHh7NAfLtVD5uLDhOwEW3hE= sha256:oHaPvaPNcC8T9twWtc+kNsaAFlqoUNIQAItKV78Kfi0=
User-Agent: slrn/1.0.3 (Linux)
Bytes: 1844

Den 2024-10-15 skrev MRAB <python@mrabarnett.plus.com>:
> On 2024-10-15 21:16, Martin Schöön via Python-list wrote:
>> Some years ago I created a Python program that reads GPS data and

<snip>

>> It is the second to last line that throws an error:
>> 
>> l.set_data(x0, y0)
>> 
>> The error messages drills down to something called
>> "/home/.../matplotlib/lines.py", line 1289, in set_xdata
>> 
>> and tells me 'x must be a sequence'
>> 

<snip>

> """
> Help on function set_data in module matplotlib.lines:
>
> set_data(self, *args)
>      Set the x and y data.
>
>      Parameters
>      ----------
>      *args : (2, N) array or two 1D arrays
>
>      See Also
>      --------
>      set_xdata
>      set_ydata
> """
>
> So, the arguments should be arrays:
>
> For example:
>
>      x0, y0 = np.array([0.0]), np.array([0.0])
>
> Has the API changed at some point?
>
So it seems.

Thanks for the quick reply.

/Martin