Deltares / Deltares/imod-python
Introduce CrossSection, MapPlot, Plot3d classes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
In GitLab by @Huite on Dec 16, 2022, 10:37
The current functions require an enormous amount of keyword arguments to get right. This isn't very ergonomic or intuitive. It's probably better to enable a step by step approach in setting up the figure:
from imod.visualize import MapPlot
map_plot = MapPlot()
map_plot.set_basemap("Stamen")
map_plot.set_raster(dataarray)
map_plot.set_overlay(geodataframe)
map_plot.set_colormap(cmap)
map_plot.set_levels(levels)
map_plot.set_colorbar(where="right")
map_plot.set_title("My Head")
map_plot.show()
# tweak something
map_plot.set_colormap(other_cmap)
map_plot.show()
For subplots, with multiple figures, take an ax arg during initialization:
fig, axes = plt.subplots(nrow=2, ncol=2)
map_plot = MapPlot(ax=axes[0])
map_plot.set_raster()
map_plot_second = MapPlot(ax=axes[1])
# etc.
Would also be good to take up unstructured data.
Some challenges: is set_raster (or set_data) sufficient? What if you would like multiple data in a single plot?
Best to make an sequence:
map_plot = MapPlot()
map_plot.set_basemap("Stamen")
map_plot.set_raster([dataarray1, dataarray2])
Drawing order (zorder) is then defined by the order in the sequence.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current visualization functions that CrossSection, MapPlot, and Plot3d would replace or wrap. Clarify the API for stepwise setup, subplot axes, multiple data layers, drawing order, and unstructured data before implementing; done means the proposed classes support the agreed workflows and existing plotting behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100