Mailing List Archive

Problem with Matplotlib example
Anyone had success running this example?
https://tinyurl.com/yhhyc9r

When I try I get this error:
"TypeError: __init__() got an unexpected keyword argument 'transform'"

This is for the line
" m = MarkerStyle(SUCESS_SYMBOLS[mood], transform=t)"

Yes, I know, I could dive into the documentation myself but I hope
some kind soul here will help out.

As far as I know I have an up-to-date matplotlib installed. Pip has
nothing more modern to offer me.

TIA

/Martin
--
https://mail.python.org/mailman/listinfo/python-list
Re: Problem with Matplotlib example [ In reply to ]
On 4/13/2023 2:41 PM, Martin Schöön wrote:
> Anyone had success running this example?
> https://tinyurl.com/yhhyc9r
>
> When I try I get this error:
> "TypeError: __init__() got an unexpected keyword argument 'transform'"
>
> This is for the line
> " m = MarkerStyle(SUCESS_SYMBOLS[mood], transform=t)"
>
> Yes, I know, I could dive into the documentation myself but I hope
> some kind soul here will help out.
>
> As far as I know I have an up-to-date matplotlib installed. Pip has
> nothing more modern to offer me.

It works for me, copy-pasted as is.

Python 3.11.3

C:\Users\tom>py -m pip show matplotlib
Name: matplotlib
Version: 3.6.3

C:\Users\tom>py -m pip show numpy
Name: numpy
Version: 1.24.2

--
https://mail.python.org/mailman/listinfo/python-list
Re: Problem with Matplotlib example [ In reply to ]
On 2023-04-13 19:41, Martin Schöön wrote:
> Anyone had success running this example?
> https://tinyurl.com/yhhyc9r
>
> When I try I get this error:
> "TypeError: __init__() got an unexpected keyword argument 'transform'"
>
> This is for the line
> " m = MarkerStyle(SUCESS_SYMBOLS[mood], transform=t)"
>
> Yes, I know, I could dive into the documentation myself but I hope
> some kind soul here will help out.
>
> As far as I know I have an up-to-date matplotlib installed. Pip has
> nothing more modern to offer me.
>
All I can say is that it works for me!

Python 3.10 and 3.11, matplotlib 3.6.1 and then 3.7.1 after updating it.

--
https://mail.python.org/mailman/listinfo/python-list
Re: Problem with Matplotlib example [ In reply to ]
Den 2023-04-13 skrev MRAB <python@mrabarnett.plus.com>:
> On 2023-04-13 19:41, Martin Schöön wrote:
>> Anyone had success running this example?
>> https://tinyurl.com/yhhyc9r
>>
<snip>
>> As far as I know I have an up-to-date matplotlib installed. Pip has
>> nothing more modern to offer me.
>>
> All I can say is that it works for me!
>
> Python 3.10 and 3.11, matplotlib 3.6.1 and then 3.7.1 after updating it.
>
Thanks are due to both you and Thomas. Your replies put me on the right
scent. I soon learned what I should have know since ages: pip reporting
there is now newer version of a package does not mean there is *no
newer* version. It means there is no newer version for the version of
Python I use. In my case I am on Python 3.7. At work, where I am on
Python 3.8, this matplotlib example works just fine.

/Martin
--
https://mail.python.org/mailman/listinfo/python-list