spedas / pyspedas

Python-based Space Physics Environment Data Analysis Software
https://pyspedas.readthedocs.io/
MIT License
143 stars 58 forks source link

right_axis feature needs to be redesigned #806

Open jameswilburlewis opened 3 months ago

jameswilburlewis commented 3 months ago

The logic to this feature should probably be reimplemented, or even better, redesigned to be more useful in the general case. Someone might want more than a "left" and "right" Y-axis -- matplotlib will give you as many as you ask for with twinx(). It might make more sense as a per-spectrogram or per-trace attribute rather than per-panel and only via pseudovariables. For example, consider a tplot variable with three traces r, theta, phi, where theta goes from 0 to 360 or -180 to 180, phi goes from -90 to +90, and r is in some distance units. You'd want 3 different scales for that, but there's no way to make that happen with tplot as it stands now.