Is there a way to convert number ranges?
I need to convert a linear range (0-1) to a logarithmic one (100*10^-12 - 1) so I can put a put a moveable horizontal line on a plotly plot (https://plotly.com/python/horizontal-vertical-shapes/#horizontal-and-vertical-lines-in-dash).
As far as I’m aware I can’t make my slider logarithmic to begin with (https://dash.plotly.com/dash-core-components/slider#non-linear-slider-and-updatemode).
I’ve tried normalizing. I’m not sure if that’s the right word, but basically putting my value into:
f(x) = log10(x * (max-min) + min)
Where:
x is the linear value being converted
max is the max of the log scale (1)
min is the min of the log scale (100*10^-12)
But f(.2) = .447 when I’m expecting 10*10^-9.
Is there a way accomplish this (or a better way to put a moveable horizontal line on the plot)?