colortable
Return a MATLAB® colormap for a COMSOL Multiphysics color table.
Syntax
map = colortable(name)
colortable(name)
list = colortable
Description
map = colortable(name) returns the color table (of 256 colors) for name, where name can be one of the list below.
colortable(name) creates a plot of the colortable name.
list = colortable returns a list of the available colortables.
The available colortable are listed below:
AuroraAustralis, AuroraAustralisDark, AuroraBorealis, and JupiterAuroraBorealis - color tables resemble the colors in the aurora australis (southern light), aurora borealis (northern light), and Jupiter’s aurora, respectively. The AuroraAustralis color table spans from white through green and indigo to blue. The AuroraAustralisDark color is similar to AuroraAustralis but does not start with absolute white so that the end value’s color is different from a white background. The AuroraBorealis color table also spans from white through green and indigo to blue but with a larger indigo portion. The JupiterAuroraBorealis color table spans from black through blue to white.
Twilight - color table uses colors associated with twilight (the illumination of the Earth’s lower atmosphere when the Sun is not directly visible), spanning colors from pink through white to blue.
Cividis - color table uses yellow and blue colors in a color table that is suited for normal vision, a deuteranomaly, or red-green colorblindness. It was created by Jamie Nuñez, Ryan Renslow, and Chris Anderton at the Biological Sciences Division of the Pacific Northwest National Laboratory (located in Richland, Washington state, United States).
Cyclic and CyclicClassic - color tables are useful for displaying periodic functions because they have a sharp color gradient — it varies the hue component of the hue-saturation-value (HSV) color model, keeping the saturation value constant (equal to 1). The colors begin with red, then pass through yellow, green, cyan, blue, magenta, and finally return to red.
Dipole - color table has been developed for plots where the majority of the solution is close to zero (or centered around some meaningful reference point) and where, in some places, positive and negative excitations occur. Typical cases are the electric potential distribution around positively and negatively charged objects with the field relaxing to zero at infinity and the pressure distribution of an acoustic wave propagating in a large open space. For those cases, the scale tends to white in areas of relative inactivity, allowing for a good contrast with titles, legends, dataset edges, and other plot elements. This reasoning is similar to the one used for the Prism color scale. The main difference is that Dipole is symmetric (or “diverging”), making it suitable for positive and negative scalar fields, whereas Prism is more suitable for vector field norms (which are positive only).
DipoleDark - similar but uses slightly darker colors.
You can use a combination of Dipole color tables to visualize streamlines, contour lines, and arrows using DipoleDark on top of a surface plot using Dipole.
Disco and DiscoClassic - color tables span from red through magenta and cyan to blue. DiscoDark and DiscoLight are similar but use darker and lighter colors, respectively.
You can use a combination of Disco color tables to visualize streamlines or contour lines using DiscoLight on top of a surface plot using Disco. The same way, DiscoDark can be used to draw on top of Disco.
Gaia - color table spans colors that make it suitable for visualizing plots related to topography and bathymetry.
GaiaLight - similar but use lighter colors.
You can use a combination of Gaia color tables to visualize streamlines or contour lines using GaiaLight on top of a surface plot using Gaia.
GrayBody - color table is based on the Planckian locus for blackbody radiation. It is useful within the context of metal processing, for example.
GrayBodyLight - is similar but use lighter colors.
You can use a combination of GrayBody color tables to visualize streamlines or contour lines using GrayBodyLight on top of a surface plot using GrayBody.
GrayScale - color table uses the linear gray scale from black to white — the easiest palette to understand and order.
GrayPrint - color table varies linearly from dark gray (RGB: 0.95, 0.95, 0.95) to light gray (RGB: 0.05, 0.05, 0.05). Choose this color table to overcome two difficulties that the GrayScale color table has when used for printing on paper — it gives the impression of being dominated by dark colors, and white is indistinguishable from the background.
Gray scale plots are often easier to use for publication. People can also better perceive structural detail in a gray scale than with color.
Inferno, Magma, and Plasma - color tables use a general bluish to reddish to yellowish color sequence, which is relatively friendly to common forms of color vision deficiencies. They are designed so that they are analytically perceptually uniform, both in regular form and when converted to black-and-white images. They were created by Stéfan van der Walt and Nathaniel Smith.
Prism - slightly similar to the Rainbow color table but includes a white tip and is brighter. It has been developed for plots where the majority of the solution is close to zero (typically at the outer perimeter of the modeling domain) and where, in some places, singularities or “hot spots” occur. This is especially true for electric and magnetic field norms in electromagnetic models, but may also occur for stress and strain norms in structural mechanics models, for example. For those cases, the scale tends to white in areas of relative inactivity, allowing for a good contrast with titles, legends, dataset edges, and other plot elements. This is the default color table for plots when using structural mechanics physics interfaces.
PrismDark - similar but uses slightly darker colors. It can be used, in combination with Prism, to add arrows or streamlines on top of a plane, for instance. Close to the hot spots the contrast between the two color scales increases, and in the wake regions the contrast will fade.
You can use a combination of Prism color tables to visualize streamlines, contour lines, and arrows using PrismDark on top of a surface plot using Prism.
Rainbow - the default for most plots that support color tables. The color ordering corresponds to the wavelengths of the visible part of the electromagnetic spectrum. It starts at the small-wavelength end with dark blue. The colors range through shades of blue, cyan, green, yellow, and red. The disadvantage of this color table is that people with color vision deficiencies (affecting up to 10% of technical audiences) cannot see distinctions between reds and greens.
RainbowClassic - the rainbow color table used in versions of COMSOL Multiphysics earlier than version 6.0. Compared to RainbowClassic, the current Rainbow color table is less saturated, more uniform, more smooth, and more balanced.
RainbowDark and RainbowLight - similar to Rainbow but use darker and lighter colors, respectively.
You can use a combination of Rainbow color tables to visualize streamlines or contour lines using RainbowLight on top of a surface plot using Rainbow. The same way, RainbowDark can be used to draw on top of Rainbow.
Spectrum and SpectrumClassic are similar to the Rainbow color tables but include violet at the small-wavelength end of the visible spectrum. They also include richer shades of green to more closely replicate the human perception of visible light.
SpectrumLight - similar but use lighter colors. You can use them with the Ray Optics Module, for example, to accurately visualize polychromatic light.
You can use a combination of Spectrum color tables to visualize streamlines or contour lines using SpectrumLight on top of a surface plot using Spectrum.
Thermal and ThermalClassic - differ in that the Thermal color table uses equal distances from dark red to orange, yellow, and white, which means that the region with the lowest values is red instead of black as in the ThermalClassic color table. The colors correspond to the colors iron takes as it heats up.
ThermalLight and ThermalLightClassic - similar but use lighter colors.
ThermalDark - similar but uses darker colors.
You can use a combination of Thermal color tables to visualize streamlines or contour lines using ThermalLight on top of a surface plot using Thermal. The same way, ThermalDark can be used to draw on top of Thermal.
ThermalWave - designed for wave phenomena with a thermal character. It is calibrated to have a 100% symmetric luminance.
ThermalWaveDark - similar to ThermalWave but with slightly darker colors.
You can use a combination of ThermalWave color tables to visualize streamlines, contour lines, and arrows using ThermalWaveDark on top of a surface plot using ThermalWave.
Traffic and TrafficClassic - color tables span from green through yellow to red.
TrafficLight and TrafficLightClassic - similar but use lighter colors.
You can use a combination of Traffic color tables to visualize streamlines or contour lines using TrafficLight on top of a surface plot using Traffic.
Viridis - color table uses a general bluish to greenish to yellowish color sequence, which is relatively friendly to common forms of color vision deficiencies. It is designed so that it is analytically perceptually uniform, both in regular form and when converted to a black-and-white image. It was created by Stéfan van der Walt and Nathaniel Smith.
Wave and WaveClassic - color tables are useful for data that naturally has positive and negative attributes in addition to a magnitude. As an example of a double-ended color scheme, it ranges linearly from blue to light gray, and then linearly from white to red. When the range of the visualized quantity is symmetric around zero, the color red or blue indicates whether the value is positive or negative, and the saturation indicates the magnitude.
People with color vision deficiencies can interpret the Wave color table because it does not use red-green-gray distinctions, making it efficient for 99.98% of the population.
WaveLight and WaveLightClassic - similar and range linearly from a lighter blue to a lighter red.
You can use a combination of Wave color tables to visualize streamlines or contour lines using WaveLight on top of a surface plot using Wave.
Note: The classic versions of some color tables correspond to that same color table in COMSOL Multiphysics versions earlier than version 6.0 (for example, RainbowClassic correspond to the Rainbow color table in versions before 6.0. The new versions of these color tables are typically less saturated, more uniform, more smooth, and more balanced.
Example
Create a rainbow color map
map = colortable('Rainbow');
colortable('Prism')