Deutsch English Français Italiano |
<mailman.25.1729035669.4695.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail From: MRAB <python@mrabarnett.plus.com> Newsgroups: comp.lang.python Subject: Re: Old matplotlib animation now fails Date: Wed, 16 Oct 2024 00:38:01 +0100 Lines: 56 Message-ID: <mailman.25.1729035669.4695.python-list@python.org> References: <ln80t9Fj0i0U1@mid.individual.net> <2136e51b-c556-4bb3-bcb3-d7299ae80be5@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de 0YAZL1TQM2gXj0ucw6lxAQDNeQtIn1S5wR31o0OWedAw== Cancel-Lock: sha1:Rb4N2roT+mE74gxj+HtTQfjGWMQ= sha256:kCtKqutlDxnztaWPckm20QqhioM3ohc6prqiLoirR28= Return-Path: <python@mrabarnett.plus.com> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=pass reason="2048-bit key; unprotected key" header.d=plus.com header.i=@plus.com header.b=Mynw+Gt1; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'error:': 0.05; 'arrays': 0.07; '"""': 0.09; 'debian': 0.09; 'example:': 0.09; 'from:addr:python': 0.09; 'moved': 0.09; 'received:192.168.1.64': 0.09; 'downloaded': 0.13; '--------': 0.16; 'arguments': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'help:': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'received:plus.net': 0.16; 'subject:fails': 0.16; 'subject:matplotlib': 0.16; 'wrote:': 0.16; 'python': 0.16; 'api': 0.17; 'code.': 0.17; 'to:addr:python-list': 0.20; 'creates': 0.22; 'version': 0.23; 'code': 0.23; 'help.': 0.25; 'function': 0.27; 'error': 0.29; 'header:User-Agent:1': 0.30; 'module': 0.31; 'program': 0.31; 'python-list': 0.32; 'received:192.168.1': 0.32; 'but': 0.32; '----------': 0.33; 'header:In-Reply-To:1': 0.34; 'year': 0.36; 'really': 0.37; 'received:192.168': 0.37; 'two': 0.39; 'ago': 0.39; 'data.': 0.40; 'martin': 0.40; 'something': 0.40; 'should': 0.40; 'url-ip:104.26/16': 0.64; 'down': 0.64; 'ago.': 0.64; 'years': 0.65; 'worked': 0.67; 'gps': 0.76; 'strategy': 0.84; 'subject:Old': 0.84; 'hence,': 0.91; 'url- ip:104.26.8/24': 0.93; 'url-ip:104.26.9/24': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1729035482; bh=obqUptoPG1Yvhpl0sX+H2drHIZXiyBtitOBsbDiGyXc=; h=Date:Subject:To:References:From:In-Reply-To; b=Mynw+Gt1DyPU6mN/wxsJ5U/xKTdEtjRhP7cBlJoKAgOTTh21N4hHyfniXHTFXqGcQ 6X92+mDSYWTxnE+iVsulSgKLPmTUKhRzc8XWugjXnUm6hObv4OdhOLGvSe+5WeEQAW j4EprnrPkmYLupah2S0v7Yos3ce5uVxyXNrC1PIw2o0yR4pCqX4Lc7o8Cw79QvGnGc 0p6EWE0FGUv6YlQDMRvoSTVdRQFfobEFTlBLx7xCGtFrUKcCLxPF3i2tv8A5CcIy/8 yE+iFT78/yVoiRL0EwTXhEdG/f/g7pLukuTeQu661Q1z6h6cxPR0uRe5S+TLdXml7X nRESaS5kIoAmQ== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.4 cv=K5mBHDWI c=1 sm=1 tr=0 ts=670efcda a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=IkcTkHD0fZMA:10 a=dzUMWQuHAAAA:20 a=bMfQmyvEybFBFpRIjV0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=ZT_8zCgGubuJgGonBfBE:22 X-AUTH: mrabarnett@:2500 User-Agent: Mozilla Thunderbird Content-Language: en-GB In-Reply-To: <ln80t9Fj0i0U1@mid.individual.net> X-CMAE-Envelope: MS4xfK/hh3s790s/QLS/ttswMOZdsVmBWj+cidCO7621II2C7UbOa+BsxiV29S5RarcQEHUFUTeoqDza2bf6oMN2oWKsTh2taHnNCM9kuQ+9GgXWNttY+VmS zGpK+hJhmnm7jTilMsfFkMQyUL/wNx9s0TEfudonQfOf858TJiT/9K0RDNMC4ZhgwhTJlMuAqIwe0t7eXmI23nNB8mDcvsmLscg= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language <python-list.python.org> List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <https://mail.python.org/pipermail/python-list/> List-Post: <mailto:python-list@python.org> List-Help: <mailto:python-list-request@python.org?subject=help> List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> X-Mailman-Original-Message-ID: <2136e51b-c556-4bb3-bcb3-d7299ae80be5@mrabarnett.plus.com> X-Mailman-Original-References: <ln80t9Fj0i0U1@mid.individual.net> Bytes: 5869 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 > 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? > This is from the help: """ 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?