Skip to content

silx.gui.plot.PlotWidget: Added asinh scale for axes#4529

Merged
t20100 merged 33 commits into
silx-kit:mainfrom
EdgarGF93:rebuild_arcsinh_x_y
Jun 15, 2026
Merged

silx.gui.plot.PlotWidget: Added asinh scale for axes#4529
t20100 merged 33 commits into
silx-kit:mainfrom
EdgarGF93:rebuild_arcsinh_x_y

Conversation

@EdgarGF93

@EdgarGF93 EdgarGF93 commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Continue from #4306

@EdgarGF93 EdgarGF93 changed the title YAxisScaleToolButton Arcsinh scale for X and Y Mar 13, 2026
@EdgarGF93 EdgarGF93 requested a review from t20100 March 13, 2026 15:59
@EdgarGF93

Copy link
Copy Markdown
Contributor Author

The icons could be improved but I think this can be reviewed. @t20100

@t20100 t20100 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for working back on this feature!

Comment thread src/silx/gui/plot/backends/BackendBase.py Outdated
Comment thread src/silx/gui/plot/backends/BackendBase.py Outdated
Comment thread src/silx/gui/plot/backends/BackendOpenGL.py Outdated
Comment thread src/silx/gui/plot/backends/BackendOpenGL.py Outdated
Comment thread src/silx/gui/plot/items/axis.py Outdated
Comment thread src/silx/gui/plot/PlotToolButtons.py Outdated
ICON_XSCALE = "mdi.arrow-left-right"
ICON_LINEAR = "ph.line-segment-bold"
ICON_LOG = "mdi.math-log"
ICON_ASINH = "mdi6.math-sin"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

arcsinh is not sin.
There's some colormap-norm-[arcsinh|linear|log]] is silx icons maybe they could be reused here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

can i combine qtawesome icons with silx icons?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would not expect so, but I don't know

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

what about this, all silx icons again

Comment thread src/silx/gui/plot/PlotToolButtons.py Outdated
Comment thread src/silx/gui/plot/PlotToolButtons.py Outdated
Comment thread src/silx/gui/plot/PlotToolButtons.py Outdated
Comment thread src/silx/gui/plot/PlotWindow.py Outdated
@EdgarGF93 EdgarGF93 force-pushed the rebuild_arcsinh_x_y branch from 3776266 to 7217f91 Compare March 20, 2026 09:47
@t20100 t20100 added this to the Next release milestone Mar 26, 2026
@t20100

t20100 commented Mar 26, 2026

Copy link
Copy Markdown
Member

We decided to make the v3.0.0 release as soon as possible and as a consequence your PR will be merged after this release, so we'll have time to also implement the arcsinh axes in the OpenGL backend.
We aim at having more frequent releases so it should not be too long before the next release.

@t20100 t20100 self-assigned this Jun 10, 2026
@t20100 t20100 moved this from Todo to In Progress in June 2026 Silx dev week Jun 10, 2026

@t20100 t20100 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, I may rework this a bit while adding the OpenGL support.



AxisScaleType = typing.Literal["linear", "log"]
AxisScaleType = typing.Literal["linear", "log", "asinh"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

matplotlib uses asinh but we use arcsinh for the colormap scaling... Would be best to use only one.
I propose to be consistent with matplotlib and use asinh and add support for this name in colormap scales (in another PR)

@t20100 t20100 force-pushed the rebuild_arcsinh_x_y branch from 7217f91 to 99b357d Compare June 15, 2026 11:09
@t20100 t20100 changed the title Arcsinh scale for X and Y silx.gui.plot.PlotWidget: Added asinh scale for axes Jun 15, 2026
@t20100 t20100 merged commit 693b944 into silx-kit:main Jun 15, 2026
2 of 4 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in June 2026 Silx dev week Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants