Open nzjrs opened 4 months ago
I've also spent a lot of time looking into whether and how it's possible in Plotly to automatically update the y-axis after zooming in on only the x-axis. I'm actually really enthusiastic about Plotly, so I was very surprised to see how such a feature, which is present in virtually every serious plotting program, could be missing. After extensive research, I found out that there's simply no direct way to do this. Communication with the developers was generally always something like this:
User: Feature Request: Please implement that when zooming in on x, y is also automatically updated. Developer: We're already working on it, it should be ready in 2, 3... User: Weeks? Months? Years? Developer: ... Or even 4.
All joking aside, I would like to express my greatest respect to the developers who make such a modern tool freely available.
To the solution: We are definitely not the first users and we won't be the last to have dealt with this.
The approach is based on the idea of supplementing the y-autoscale feature directly in JavaScript. There were some suggestions from
as well as useful links to documentation mentioned therein
Enclosed is a code suggestion that should at least make the idea clear:
It's certainly not the fastest or most stable way to implement something like this (e.g., there's a bug when zooming in too close so that no sample is visible), but it works satisfactorily for me as long as there's no official solution. Attached is also an html file in which this approach has been implemented:
240910_traj2_crocddyl_mpc_thorizon_25ms.html.zip
I hope this feature will be implemented very soon.
Best regards
This is a common request.
I would expect when I zoom on the x-axis, in a linked plot configuration, the y-axis would scale to the selected/zoomed range.
Here are reports of users requesting this feature