Re: Old matplotlib animation now fails

Liste des GroupesRevenir à cl python 
Sujet : Re: Old matplotlib animation now fails
De : martin.schoon (at) *nospam* gmail.com (Martin Schöön)
Groupes : comp.lang.python
Date : 16. Oct 2024, 10:23:17
Autres entêtes
Organisation : @ Home
Message-ID : <ln9bflFp0saU2@mid.individual.net>
References : 1 2 3
User-Agent : slrn/1.0.3 (Linux)
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

Date Sujet#  Auteur
15 Oct 24 * Old matplotlib animation now fails14Martin Schöön
15 Oct 24 +* Re: Old matplotlib animation now fails10Stefan Ram
16 Oct 24 i`* Re: Old matplotlib animation now fails9Martin Schöön
16 Oct 24 i +* Re: Old matplotlib animation now fails2Stefan Ram
16 Oct 24 i i`- Re: Old matplotlib animation now fails1Martin Schöön
16 Oct 24 i `* Re: Old matplotlib animation now fails6rbowman
17 Oct 24 i  +* Re: Old matplotlib animation now fails3Chris Townley
17 Oct 24 i  i`* Re: Old matplotlib animation now fails2rbowman
17 Oct 24 i  i `- Re: Old matplotlib animation now fails (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
17 Oct 24 i  +- Re: Old matplotlib animation now fails (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
17 Oct 24 i  `- Re: Old matplotlib animation now fails1Stefan Ram
16 Oct 24 +- Re: Old matplotlib animation now fails (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
16 Oct 24 `* Re: Old matplotlib animation now fails2MRAB
16 Oct 24  `- Re: Old matplotlib animation now fails1Martin Schöön

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal