#745 closed upgrade (Done)
Updated Matlab Colormaps
Reported by: | arango | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.7 |
Component: | Matlab | Version: | 3.7 |
Keywords: | Cc: |
Description (last modified by )
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.
Here are some of the examples with various color maps:
cm_balance:
cm_curl:
cm_delta:
cm_haline:
cm_matter:
cm_speed:
cm_solar:
cm_thermal:
viridis:
Change History (3)
comment:1 by , 8 years ago
Component: | Nonlinear → Matlab |
---|---|
Resolution: | → Done |
Status: | new → closed |
Type: | bug → upgrade |
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
comment:3 by , 8 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.