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

Pass kwargs to plot.mesh #680

Open
chrisawhitwell opened this issue Mar 25, 2024 · 2 comments
Open

Pass kwargs to plot.mesh #680

chrisawhitwell opened this issue Mar 25, 2024 · 2 comments

Comments

@chrisawhitwell
Copy link

Hi,

I am relatively new to the package so feel free to close if this functionality exists (if so, maybe incorporating into the docs would be helpful).

We should be able to pass kwargs to the matplotlib function that is being used by mikeio when using the plot methods.

For example, if I want to change the colors/line widths etc of a mesh in a dfsu, it might look like.

fig, axes = plt.subplots()
mds.geometry.plot.mesh()
collection = axes.get_children()[0]
collection.set(**kwargs)

but this could be:

mds.geometry.plot.mesh(**kwargs)
@ecomodeller
Copy link
Member

Hi @chrisawhitwell, would you like to submit a PR with your suggestion?

The place to start tweaking is

Please also add a test that showcases the functionality.

@chrisawhitwell
Copy link
Author

Hey @ecomodeller, Sure thing I will get to it when I find some time!

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

2 participants