I use Plotly Python to produce graphs to help me analyse acoustics data.
I plot spectrums on a graph.
I would now like to improve it by adding harmonics cursors to help visualize harmonics on my graph.
I already managed to add one cursor as shown below but the idea here would be to have 10 cursors for example and have all of them move with the first one.
Let’s say the first one is at a x value of f1=150Hz. The second one should always be at f2=2150Hz, the third one at f3=3150Hz, etc…
The cursor on the image moves automatically with my mouse when I hover over the graph.
I added this cursor with this line of code:
Just tried it out and it does the job perfectly! In the case of harmonics I would just change create_shapes(x, x + 1, x + 2) to create_shapes(x, 2*x, 3*x) but that’s just a detail.