silx.gui.plot.PlotWidget: Added yaxis arcsinh support with matplotlib backend#4306
silx.gui.plot.PlotWidget: Added yaxis arcsinh support with matplotlib backend#4306EdgarGF93 wants to merge 14 commits into
Conversation
|
Nice. This could also be a good opportunity to rework the backend API with normalization. Because actually, to set linear, we have to set |
|
I think I'll leave the opengl for somebody else :) |
t20100
left a comment
There was a problem hiding this comment.
Let's OpenGL support for later.
I also propose to do this PR on adding arcsinh to PlotWidget with matplotlib and keep the QAction for a second one.
Could you add arcsinh scale for x axis as well for consistency?
| </g> | ||
| <g id="logGroup"> | ||
| </g> | ||
| <text id="asinhText" x="8.0" y="19" font-weight="bold" font-family="sans-serif" font-size="0.56em">asinh</text> |
There was a problem hiding this comment.
Could you convert the text to a path so the icon does not rely on system fonts?
If you don't know how to do it, i can show you.
| def setYAxisArcsinh(self, flag): | ||
| if flag: | ||
| self.ax2.set_yscale("asinh") | ||
| self.ax.set_yscale("asinh") | ||
| return | ||
|
|
||
| self.ax2.set_yscale("linear") | ||
| self.ax2.yaxis.set_major_formatter(DefaultTickFormatter()) | ||
| self.ax.set_yscale("linear") | ||
| self.ax.yaxis.set_major_formatter(DefaultTickFormatter()) |
There was a problem hiding this comment.
Would be best to change the backend to have a single place where to set scale for yaxis.
I would replace setYAxisLogarithmic and setYAxisArcsinh by a setScale.
The backend are not marked as private with an _ but they should have and we don't keep the compatibility.
| def _internalSetArcsinh(self, flag): | ||
| self._getBackend().setYAxisArcsinh(flag) |
There was a problem hiding this comment.
Same as above, _internalSetLogarithmic and _internalSetArcsinh could be replaced by a _internalSetScale
|
@EdgarGF93 would you have time to have a look at @t20100 review and update the (matplotlib backend) code or do you step down in favor of somone else ? |
|
I'll finish it, sorry for letting it for so long |
Don't worry. We are doing some cleanup and we just want to know where we are :) |
|
I leave you @t20100 the part of generating the icons |
We just added a dependency on https://github.com/spyder-ide/qtawesome which as plenty of nice icon. If you want to decide by yourself ;) |
sure , let me check |
|
Continue cherrypicking on #4529 |
Checklist:
<Module or Topic>: <Action> <Summary>(see contributing guidelines)