Deltares / Deltares/imod-python
imod.visualize.cross_section could also support alternative color bar labeling
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
In GitLab by @FransRoelofsen on Feb 22, 2023, 16:36
[relation with issue about reading labels from iMOD5 *.leg file https://gitlab.com/deltares/imod/imod-python/-/issues/332]
remarks:
- input parameter "Labels" could be 'optional' or otherwise equal to 'levels'
My fix is/was adding the line plt.yticks:
# Add colorbar
divider = make_axes_locatable(ax)
cbar_ax = divider.append_axes("right", size="5%", pad="5%")
fig.colorbar(ax1, cax=cbar_ax, **settings_cbar)
plt.yticks(ticks=levels, labels=labels)
if not return_cmap_norm:
return fig, ax
else:
return fig, ax, cmap, norm
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 at the imod.visualize.cross_section entry point and inspect how levels, labels, and settings_cbar are passed to the color bar. Compare the requested optional Labels behavior with the related issue about reading labels from an iMOD5 .leg file; done means alternative labels appear on the color bar without breaking the existing return_cmap_norm behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100