You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to fix #3229 makes me think that it could be an opportunity to make norm selection a little more clear, and in particular it seems like a good time to propose a new rule.
So here's an example to illustrate how our current scale selection rules can be damaging for data readability
output:
The default colorscale is actually pretty obscure because a log norm isn't appropriate here.
(note: I've used my branch #3536 to produce this picture to avoid distraction from an unrelated colorbar bug)
Using yt's main branch
)
As an easy fix to the issue above, I'm proposing that we use linear scaling by default instead of log on the condition that the value range is below 2 orders of magnitude. I believe this can be achieved at the same time as a fix to #3229.
Of course this criterion isn't sufficient and it would also make sense to compare the variance of the image VS the variance of its log, but I don't really like the idea of piling up layers of magic here, as the existing norm-selection mechanism is already proving difficult to maintain against a large range of matplotlib versions.
In an ideal world, we should expose the color norm completely so all of matplotlib's flexibility is available to our users.
I would like to do that in the future, but for now I want to focus on having sensible defaults.
The text was updated successfully, but these errors were encountered:
arguably the example in the OP is terribly malformed, I don't think it's illustrating the point correctly now so I'd rather close it and maybe reopen when things stabilise with matplotlib 3.5
Trying to fix #3229 makes me think that it could be an opportunity to make norm selection a little more clear, and in particular it seems like a good time to propose a new rule.
So here's an example to illustrate how our current scale selection rules can be damaging for data readability
output:

The default colorscale is actually pretty obscure because a log norm isn't appropriate here.
(note: I've used my branch #3536 to produce this picture to avoid distraction from an unrelated colorbar bug)
Using yt's main branch
As an easy fix to the issue above, I'm proposing that we use linear scaling by default instead of log on the condition that the value range is below 2 orders of magnitude. I believe this can be achieved at the same time as a fix to #3229.
Of course this criterion isn't sufficient and it would also make sense to compare the variance of the image VS the variance of its log, but I don't really like the idea of piling up layers of magic here, as the existing norm-selection mechanism is already proving difficult to maintain against a large range of matplotlib versions.
In an ideal world, we should expose the color norm completely so all of matplotlib's flexibility is available to our users.
I would like to do that in the future, but for now I want to focus on having sensible defaults.
The text was updated successfully, but these errors were encountered: