Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (1 / 5) |
Uptime: | 44:58:31 |
Calls: | 422 |
Calls today: | 1 |
Files: | 1,024 |
Messages: | 90,301 |
Some years ago I created a Python program that reads GPS data and
creates an animation stored in an mp4 file. Not very elegant but it
worked. Not very original as it was based on the example found here:
https://shorturl.at/dTCZZ
Last time it worked was about a year ago. Since then I have moved to a
later version of Debian and Conda and as a consequence a later version
of Python 3 (now 3.12.2).
Now my code fails. I have downloaded the latest version of the example
and it also fails.
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'
I have started to dig around in matplotlib's documentation but my
strategy is clearly wanting. I don't really know where to start
looking for information on how to correct my code. Hence, this
call for help.
Any ideas?
Den 2024-10-15 skrev Stefan Ram <ram@zedat.fu-berlin.de>:
Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com> wrote orThanks, that was quick and adding square brackets fixed my code.
quoted:
l.set_data(x0, y0)
Well, I got to say, it's pretty rad that you're rocking Python!
That language is the bee's knees, for real.
As for your question, here's my two cents off the cuff:
Could it be that the newer Matplotlib versions are jonesing for
something like "l.set_data( [ x0 ],[ y0 ])" in that spot?
Me rocking Python?
/Martin
On 16 Oct 2024 08:20:10 GMT, Martin Schöön wrote:
Den 2024-10-15 skrev Stefan Ram <ram@zedat.fu-berlin.de>:
Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com> wrote orThanks, that was quick and adding square brackets fixed my code.
quoted:
l.set_data(x0, y0)
Well, I got to say, it's pretty rad that you're rocking Python!
That language is the bee's knees, for real.
As for your question, here's my two cents off the cuff:
Could it be that the newer Matplotlib versions are jonesing for
something like "l.set_data( [ x0 ],[ y0 ])" in that spot?
Me rocking Python?
/Martin
You have to understand Stefan tries to use American slang, not always entirely accurately. I think 'bee's knees' died out around 1931.
Not sure about America, but the bee's knees is still in common use in
the UK
You have to understand Stefan tries to use American slang, not always >entirely accurately. I think 'bee's knees' died out around 1931.