Opened 8 years ago
Last modified 8 years ago
#745 closed upgrade
Updated Matlab Colormaps — at Initial Version
Reported by: | arango | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.7 |
Component: | Matlab | Version: | 3.7 |
Keywords: | Cc: |
Description
The color maps released on src:ticket:744 were modified to allow interpolation according to the number of colors requested. All the color maps have 256 values, except cm_delta with 512 values.
All the color maps have an optional input argument for the number of colors desired. For example, cm_balance.m has:
% CM_BALANCE: 256 color palette from CMOCEAN % % cmap = cm_balance(M) % % BALANCE colormap by Kristen Thyng. % % On Input: % % M Number of colors (integer, OPTIONAL) % % On Ouput: % % cmap Mx3 colormap matrix % % Usage: % % colormap(cm_balance) % colormap(flipud(cm_balance)) % % https://github.com/matplotlib/cmocean/tree/master/cmocean/rgb % % Thyng, K.M., C.A. Greene, R.D. Hetland, H.M. Zimmerle, and S.F DiMarco, 2016: % True colord of oceanography: Guidelines for effective and accurate colormap % selection, Oceanography, 29(3), 9-13, http://dx.doi.org/10.5670/oceanog.2016.66 %
If we want to overwrite the default number of colors, we can use for example:
>> colormap(cm_balance(128)); or equivalent >> cmocean('balance', 128);
notice that in cmocean the cm_ prefix is dropped. Read documentation by issuing the help command in Matlab.
Note:
See TracTickets
for help on using tickets.