Histogram bar color, specified as 'auto', an RGB triplet, a hexadecimal
color code, a color name, or a short name. The default value of
'auto' lets the histogram choose the
color.
For a custom color, specify an RGB triplet or a hexadecimal color code.
An RGB triplet is a three-element row vector whose elements
specify the intensities of the red, green, and blue
components of the color. The intensities must be in the
range [0,1], for example, [0.4
0.6 0.7].
A hexadecimal color code is a string scalar or character
vector that starts with a hash symbol (#)
followed by three or six hexadecimal digits, which can range
from 0 to F. The
values are not case sensitive. Therefore, the color codes
"#FF8800",
"#ff8800",
"#F80", and
"#f80" are equivalent.
Alternatively, you can specify some common colors by name. This table lists the named color
options, the equivalent RGB triplets, and the hexadecimal color codes.
| Color Name | Short Name | RGB Triplet | Hexadecimal Color Code | Appearance |
|---|
"red" | "r" | [1 0 0] | "#FF0000" | |
"green" | "g" | [0 1 0] | "#00FF00" | |
"blue" | "b" | [0 0 1] | "#0000FF" | |
"cyan"
| "c" | [0 1 1] | "#00FFFF" | |
"magenta" | "m" | [1 0 1] | "#FF00FF" | |
"yellow" | "y" | [1 1 0] | "#FFFF00" | |
"black" | "k" | [0 0 0] | "#000000" | |
"white" | "w" | [1 1 1] | "#FFFFFF" | |
"none" | Not applicable | Not applicable | Not applicable | No color |
This table lists the default color palettes for plots in the light and dark themes.
| Palette | Palette Colors |
|---|
"gem" — Light theme default
Before R2025a: Most plots
use these colors by default. |
|
"glow" — Dark theme default
|
|
You can get the RGB triplets and hexadecimal color codes for these palettes using the orderedcolors and rgb2hex functions. For example, get the RGB triplets for the "gem" palette and convert them to hexadecimal color codes.
Before R2023b: Get the RGB triplets using RGB =
get(groot,"FactoryAxesColorOrder").
Before R2024a: Get the hexadecimal color codes using H =
compose("#%02X%02X%02X",round(RGB*255)).
If you specify DisplayStyle as 'stairs',
then polarhistogram does not use the FaceColor property.
Example: polarhistogram(theta,'FaceColor','g') creates
a histogram plot with green bars.