midpoint is not transformed in scale_color_gradient2 #3198
Labels
breaking change ☠️
API change likely to affect existing code
bug
an unexpected problem or unintended behavior
scales 🐍
When using
scale_color_gradient2
withtrans = "log10"
, I was expecting themidpoint
to be transformed as well. The documentation does not specify howmidpoint
behaves under transformation.Reproducible example
Without transformation:
With transformation
I was expecting to use
midpoint = color_midpoint
so thetrans = "log10"
would apply to both the color aesthetic and the midpoint. However I had to apply manuallymidpoint = log10(color_midpoint)
.The main advantage of letting the
trans
transform themidpoint
is that if I change the transformation then themidpoint
keeps being valid (and consistent with the aesthetic units), while now I have to manually transform themidpoint
for every transformation I use.Is is possible to change the behaviour of
midpoint
so it affected bytrans
? If not, is it possible to document this behaviour?Thanks for your time and splendid work
The text was updated successfully, but these errors were encountered: