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

Changes in API of matplotlib 3.5 #166

Open
CedricPatzer opened this issue Jan 11, 2022 · 0 comments
Open

Changes in API of matplotlib 3.5 #166

CedricPatzer opened this issue Jan 11, 2022 · 0 comments

Comments

@CedricPatzer
Copy link

from mtpy.core.mt import MT 

edi_file = "test.edi"
mt_obj = MT(edi_file)
pt_obj = mt_obj.plot_mt_response(plot_num=1,plot_pt='n',plot_tipper='n')

Gives error: init() got an unexpected keyword argument 'nonposx' due to:
self.axp.set_xscale('log', nonposx='clip')
in plot_mt_response.py

The reason is due to changes in the Matplotlib API

semilogx, semilogy, loglog, LogScale, and SymmetricalLogScale used to take keyword arguments that depends on the axis orientation ("basex" vs "basey", "subsx" vs "subsy", "nonposx" vs "nonposy"); these parameter names have been removed in favor of "base", "subs", "nonpositive". This removal also affects e.g. ax.set_yscale("log", basey=...) which must now be spelled ax.set_yscale("log", base=...).

The change from "nonpos" to "nonpositive" also affects LogTransform, InvertedLogTransform, SymmetricalLogTransform, etc.

There may be more issues further down the road

@kujaku11 kujaku11 mentioned this issue Jan 26, 2022
8 tasks
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

No branches or pull requests

1 participant