spedas / bleeding_edge

IDL-based Space Physics Environment Data Analysis Software (bleeding edge)
http://www.spedas.org
Other
7 stars 0 forks source link

Reverse energy bin order in spectrograms? #75

Closed jameswilburlewis closed 1 year ago

jameswilburlewis commented 1 year ago

From Vassilis:

Do you know if tplot can plot an energy spectrogram with the y-axis in reverse order (high-to-low)? It would be the equivalent of flipping the spectrogram up-down, including the axis. I.e., the axis would have to be increasing going down, rather than up.

The tplot variable can be easily changed by the user to be cast in inverse energy in the .y, and in the .v tags, if that is needed. If a keyword were present to do that it would be easier (yaxis_reverse=1). Either way it would be fine, if at all possible.

jameswilburlewis commented 1 year ago

From Jim M:

There is no inverse keyword in tplot, and swapping the order of the data in the tplot variable will have no effect. Instead, change the order of the yrange option in the variable:

get_data, varname, data = d
options, varname, 'yrange', rotate(minmax(d.v), 2)