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

Improve "fringy" look when plotting shaded dfsu. #760

Open
zweihuehner opened this issue Nov 27, 2024 · 0 comments
Open

Improve "fringy" look when plotting shaded dfsu. #760

zweihuehner opened this issue Nov 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@zweihuehner
Copy link

Description
When plotting a dfsu DataArray with plot_type="shaded", the triangles that lie close to elements that fell "dry" during a simulation are looking quite fringy. The underlying function is the matplotlib tripcolor in _FM_utils.py. Possibly the behavior is coming from matplotlib and can not be changed in mikeio.

To Reproduce
Load a dfsu dataset that comes from a m3fm simulation with dry falling elements. Plot a DataArray from the dataset like the following.

import mikeio
import matplotlib.pyplot as plt
ds = mikeio.read("example.dfsu")
fig, ax = plt.subplots(figsize = (14,14))
ds.Current_speed.plot(ax = ax, plot_type="shaded")

Example File:
example_dfsu.zip

Expected behavior
See a shaded plot without the fringy look of the triangle edges.

Screenshots
image

System information:

  • Python version: 3.10.10
  • MIKE IO version: 2.2.dev3
@ecomodeller ecomodeller added the enhancement New feature or request label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants