Multiple axis for one trace without duplicating

I’m trying to create a plot that shows a trace of temperature data and would like the left axis to be in degrees Celsius and the right y-axis to be in degrees Fahrenheit. I found this post, Multiple axis for one trace, which has an answer that involves making two separate traces. I’m wondering if it is possible in plotly.js to provide some conversion function or even relayout with updated range or even explicit ticktext/tickvals so I can have one trace with two “linked” y-axes?

My only concern with multiple traces is any future performance problems having twice the amount of data. I’m guessing that plotly has to draw it twice too.

Any guidance is appreciated.

I see that this is a three year old post without an answer, but I am looking for the same thing. Have also read the official documentation and seen nothing on this.

Is there a way to have two y-axis with 1 trace? If not, what is the best workaround without creating multiple legends etc.

What I want

*What I currently have

I’m not even sure how to go about with duplicating the data in a way to ensure consistency.

I found some insight here.

1 Like