TideMan
November 18, 2019, 4:00am
1
The new spectrogram colour pallet is growing on me…
Can someone supply the colormap in RGB so that I can use it in Matlab?
The map will have three columns for Red, Green, and Blue like this (for “jet” which goes from dark blue to green to dark red):
0 0 0.5625
0 0 1.0000
0 1.0000 1.0000
1.0000 1.0000 0
1.0000 0 0
0.5000 0 0
Hi TideMan—these may work for you:
If not, then you can find the RGB for the four perceptually uniform and linear Python colormaps here:
# New matplotlib colormaps by Nathaniel J. Smith, Stefan van der Walt,
# and (in the case of viridis) Eric Firing.
#
# This file and the colormaps in it are released under the CC0 license /
# public domain dedication. We would appreciate credit if you use or
# redistribute these colormaps, but do not impose any legal restrictions.
#
# To the extent possible under law, the persons who associated CC0 with
# mpl-colormaps have waived all copyright and related or neighboring rights
# to mpl-colormaps.
#
# You should have received a copy of the CC0 legalcode along with this
# work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
__all__ = ['magma', 'inferno', 'plasma', 'viridis']
_magma_data = [[0.001462, 0.000466, 0.013866],
[0.002258, 0.001295, 0.018331],
[0.003279, 0.002305, 0.023708],
[0.004512, 0.003490, 0.029965],
This file has been truncated. show original
TideMan
November 18, 2019, 10:44pm
3
Thank you Ian. The Matlab File Exchange link worked for me.
1 Like