Deutsch   English   Français   Italiano  
<slrnt33u1c.jcq1.lulu042@valentino.Rock-n-Roll.org>

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

Path: ...!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!jVhmzutVZU+CfOePwZZQrw.user.46.165.242.75.POSTED!not-for-mail
From: Lulu <lulu042@fry.fr.invalid>
Newsgroups: fr.comp.lang.python
Subject: Re: Warning matplotlib
Date: Wed, 16 Mar 2022 15:46:04 +0100
Organization: koitess?
Message-ID: <slrnt33u1c.jcq1.lulu042@valentino.Rock-n-Roll.org>
References: <slrnt31qb5.6iog.lulu042@valentino.Rock-n-Roll.org>
 <87bky7x90g.fsf@universite-de-strasbourg.fr.invalid>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="65078"; posting-host="jVhmzutVZU+CfOePwZZQrw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: slrn/1.0.3 (Linux)
X-Notice: Filtered by postfilter v. 0.9.2
Bytes: 2698
Lines: 42

Le 15-03-2022, Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> a écrit :
>  Lulu <lulu042@fry.fr.invalid> writes:
> 
>> (Re-)Bonjour,
>>
>> Il semble que je n'utilise pas correctement la fonction 'stem' de
>> matplotlib. A l'exécution ce Warning apparaît :
>> 8<-----------8<---------8<----------8<----------8<----------8<----------8<
>> analyse_spectrale_original.py:52: MatplotlibDeprecationWarning:
>> Passing the linefmt parameter positionally is deprecated since
>> Matplotlib 3.5; the parameter will become keyword-only two minor
>> releases later.
>>   markers,stemlines,base = stem([0, 1, 2, 3], [0.4, 1.0, 0.5, 0.2], 'r')
>> 8<-----------8<---------8<----------8<----------8<----------8<----------8<
>>
>> La ligne 52 de mon script :
>> markers,stemlines,base = stem([0, 1, 2, 3], [0.4, 1.0, 0.5, 0.2], 'r')
> 
>  Oui, c'est dit dans le message d'erreur.
> 
>> J'ai googlisé ce warning et malgré la consultation de divers messages
>> sur python-forum.io ou stackoverflow.com, je ne comprends même pas la
>> signification de ce message (si ce n'est que bientôt ce warning se
>> transformera en erreur), ni les solutions proposées.
> 
>  C'est curieux cette tendance a lire à peu près tout sauf la
>  documentation...
 
;-)

>  https://docs.python.org/3/glossary.html#term-argument
>  https://docs.python.org/3/reference/expressions.html#calls

OK, bookmarké !

J'ai compris ce que signifiait "Passing the linefmt parameter
positionally" : en fait je ne connaissais pas la notion de "positional
argument" et de "keyword argument".
 
>  Pour ton problème : utilise linefmt='r' au lieu de simplement 'r' (mais
>  'r' n'a pas l'air d'être une valeur correcte).

Merci pour ton aide et les liens vers la doc officielle.