Adding a colorbar label/title using average TFR plot

Hi all,

I’m making plots of the grand average TFR across multiple subjects, following the method detailed here:
https://mne.tools/dev/auto_examples/time_frequency/time_frequency_simulated.html#calculate-a-time-frequency-representation-tfr

Everything works fine, but I cannot figure out how to add a units label to the colorbar I produce. When using the power.plot command, I am specifying dB=True and I pass an axis object to the function, so I would ideally like to be able to place ‘dB’ to the right of the colorbar, or even above, as is automatically done in commands like evoked.plot_topomap (Plotting topographic maps of evoked data — MNE 1.1.1 documentation).

If anyone knows how to do this please let me know!

  • MNE version: 1.0.3
  • operating system: Debian

To answer my own question for anyone else struggling:

im = ax.images
cb = im[-1].colorbar
cb.set_label('Amplitude [dB]')
2 Likes