Skip to content

Create a custom widget to include controls#199

Merged
keewis merged 19 commits intoxarray-contrib:mainfrom
keewis:widget
Dec 10, 2025
Merged

Create a custom widget to include controls#199
keewis merged 19 commits intoxarray-contrib:mainfrom
keewis:widget

Conversation

@keewis
Copy link
Copy Markdown
Member

@keewis keewis commented Dec 5, 2025

This widget is an alternative to #197, but does not support the player nor does it use H3HexagonLayer for h3 cells. The main advantage of having a single widget is that it will make #196 much easier.

This PR also splits up the plotting module into multiple files, which may make working on the code a bit easier.

@keewis keewis mentioned this pull request Dec 5, 2025
4 tasks
@relativityhd
Copy link
Copy Markdown

Looks promising! A few features I would miss as a user from #197 :

  • "Robust" colorscaling via 2nd and 98th percentile (This is actually very important to me, also to having it enabled by default)
  • Per-Variable colorize settings
  • Type hints for the explore method of the accessor

@keewis
Copy link
Copy Markdown
Member Author

keewis commented Dec 8, 2025

"Robust" colorscaling via 2nd and 98th percentile

This should be done in the most recent commit. Let me know if you'd need this also for centered plots (i.e. where center is set, we call abs(var).max() to infer the limits right now).

@relativityhd
Copy link
Copy Markdown

Yes, I think it would make sense to have it also in the centered version, at least I implemented it in #197

@keewis
Copy link
Copy Markdown
Member Author

keewis commented Dec 10, 2025

I've added everything except per-variable colorize options, which I will punt to a future PR (same as the special casing of H3 for plotting).

I believe the failing docs are caused by the widget breaking the map composition examples (merging and side-by-side), but this can be taken care of in #196

@keewis
Copy link
Copy Markdown
Member Author

keewis commented Dec 10, 2025

(also, if you notice anything that's wrong / broken, I don't mind iterating quickly)

@keewis keewis merged commit 13a4c9b into xarray-contrib:main Dec 10, 2025
13 of 14 checks passed
@keewis keewis deleted the widget branch December 10, 2025 15:39
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

Successfully merging this pull request may close these issues.

2 participants