Replies: 2 comments
-
Hi, adding a I don't know if we could make a 3-state button or something? Should the log option be a dropdown menu instead? Should the same also apply to the vertical axis when making a 1d plot? Apart from all these questions, a workaround for now could be to set the normalizer on the colormapper, and re-create the colorbar. from matplotlib.colors import SymLogNorm
from matplotlib.colorbar import ColorbarBase
cmapper = f.view.colormapper
cmapper.normalizer = SymLogNorm(linthresh=1.0e-4)
cmapper.colorbar = ColorbarBase(cmapper.cax, cmap=cmapper.cmap, norm=cmapper.normalizer)
f.view.render()
f I have not extensively tested this, so I am not sure it all works properly. You'd have to double-check that the colors correspond to the expected values, but at first glance it seems to agree with what raw MPL produces. |
Beta Was this translation helpful? Give feedback.
-
Ok, so the workaround is exactly what I was looking for, so thanks for that. About the widget, I'm not sure what can be done. I don't like the 3 state button, because that would mean re-rendering a figure twice sometimes instead of just once. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I really love working with
scipp
andplopp
. But if there is one thing that is really missing for me, then it would be a symmetric log norm.SymLogNorm
centered around 0 and combined with a diverging color map is just great for visualizing datasets with positive and negative values, like e.g., vector field components.Do you currently plan to work on such a feature? I could also imagine working on it myself, with just a bit of initial guidance from your side.
Also, is there maybe a relatively easy way of working with custom norms, that does not require switching completely to native matplotlib and doing everything oneself? Sth that I could use as a workaround.
Cheers
Paweł
Beta Was this translation helpful? Give feedback.
All reactions