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

Replace fixed-point with exact notation in Matrix and Compound vis #1753

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Feb 4, 2025

As discussed in #1646 (comment).

Keeping the issue open until I address the formatting of numbers in the visualizations' tooltips.

This should also address the user need of #1742 in a more usable way than the solution proposed of adding a control to the toolbar to increase the fixed-point precision.

While I'm at it, I bring the formatting of complex numbers in line with the formatting of other numbers. We were so far using formatters with less precision to save space in the Matrix vis, but I think consistency should prime.

Here is a more precise list of user-facing changes:

  1. < Scalar > Display complex numbers with exact precision
  2. < Scalar > Always show both real and imaginary parts of complex numbers to avoid confusing complex numbers without imaginary parts with real numbers — this applies also when inspecting values of complex attributes in the metadata viewer
  3. < Matrix, Compound > Replace Fixed-point notation with Exact notation to allow inspecting and copying exact values
  4. < Matrix, Compound > Inherit integer and/or float formatting for complex numbers in Auto and Scientific notations (depending on dtype of real and imaginary parts) — concretely, complex numbers are now displayed with more precision regardless of the notation.
# Before After
1 image image
2 image image
3 image image image image
4 image image image image

@axelboc
Copy link
Contributor Author

axelboc commented Feb 4, 2025

/approve

@axelboc axelboc requested a review from loichuder February 5, 2025 07:53
Copy link
Member

@loichuder loichuder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, excellent implementation 👏

@axelboc axelboc merged commit 76d9679 into main Feb 5, 2025
8 checks passed
@axelboc axelboc deleted the exact-notation branch February 5, 2025 08:35
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