Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(matplotlib): axes kwargs updated (basex,basey -> base) #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdivry
Copy link

@cdivry cdivry commented Oct 20, 2023

Fixing semilog plots from matplotlib

Here's a little fix to update matplotlib latest axis usage

TypeError: LogScale.__init__() got an unexpected keyword argument 'basex'

related issues :

new behavior :

https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.semilogx.html
https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.semilogy.html

axis.semilog plots now expects base keyword argument

how to reproduce the bug / test the merge request

requirements :

matplotlib==3.8.0
numpy==1.26.1

test / reproduce :

python3 examples/filter/low-pass-rc-filter.py

@cdivry cdivry marked this pull request as draft October 20, 2023 17:03
@cdivry cdivry changed the title fix(matplotlib): axes kwargs updated (basex,basey) -> (base_x,base_y) DRAFT: fix(matplotlib): axes kwargs updated (basex,basey) -> (base_x,base_y) Oct 20, 2023
@cdivry cdivry force-pushed the fix_matplotlib_latest_base_axis branch from 101cd82 to c7b2fec Compare October 20, 2023 17:12
@cdivry cdivry changed the title DRAFT: fix(matplotlib): axes kwargs updated (basex,basey) -> (base_x,base_y) DRAFT: fix(matplotlib): axes kwargs updated (basex,basey -> base_y) Oct 20, 2023
@cdivry cdivry changed the title DRAFT: fix(matplotlib): axes kwargs updated (basex,basey -> base_y) fix(matplotlib): axes kwargs updated (basex,basey -> base_y) Oct 20, 2023
@cdivry cdivry marked this pull request as ready for review October 20, 2023 17:13
@cdivry cdivry changed the title fix(matplotlib): axes kwargs updated (basex,basey -> base_y) fix(matplotlib): axes kwargs updated (basex,basey -> base) Oct 20, 2023
@cdivry
Copy link
Author

cdivry commented Oct 20, 2023

we could even remove this explicit arg, because the default value for base is already 10
https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.semilogx.html#matplotlib-axes-axes-semilogx

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant