✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Setting a custom axis scale for plotly

Hi, all,

I would like to create a plot with a nonlinear x-scale, similar to having logarithmic axes, but specifically with the function 1/x. I need this because I want to create a plot with two x-axes, one with one set of physical units (x, in units of nanometers for the wavelength of photon of light), and another with a different set of physical units that are a constant divided by those units (electron volts, calculated by 1240.0/x).

Axes with this kind of 1/x scale don’t appear to be a default option for scatterplots in plotly in the same way as a log scale. Is there a way to set custom axes in plotly?

Thank you!

1 Like

Hey @David_Colds,
have you figured out the solution? I would like to do a similar thing.