Conversation
📝 WalkthroughWalkthroughThis PR adds clarifying documentation to the imshow method across two files, explaining that color bounds (zmin/zmax) are computed from the entire dataset by default to ensure consistent coloring across animation frames and facets, and describing how the robust parameter behavior defaults to min/max when disabled. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
xarray_plotly/accessor.py (1)
260-263: Consider mentioning facets for consistency and completeness.The note mentions "consistent coloring across animation frames" but the corresponding note in
plotting.py(lines 413-414) mentions "animation frames and facets". For consistency and completeness, consider including facets here as well, since the color bounds behavior applies to both.📝 Suggested revision
Note: **Difference from px.imshow**: Color bounds are computed from the entire dataset by default, ensuring consistent coloring across - animation frames. Use `zmin`/`zmax` to override. + animation frames and facets. Use `zmin`/`zmax` to override.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
xarray_plotly/accessor.pyxarray_plotly/plotting.py
🔇 Additional comments (2)
xarray_plotly/plotting.py (2)
411-417: Excellent documentation addition!This note clearly explains the key behavioral difference from
px.imshowand provides important context for users working with animations and facets. The explanation is accurate based on the implementation (lines 458-469) and helps prevent confusion about auto-scaling behavior.
433-433: Clear improvement to parameter documentation.Explicitly stating the default behavior "(uses min/max)" makes the documentation more helpful and removes ambiguity about what happens when
robust=False.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.