Colormaps#
Usage#
The easychart
package comes pre-loaded with the 83 colormaps available in matplotlib. Each of these can be assigned by name to the chart.cAxis
to convert the colormap to the chart.colorAxis.stops of the relevant chart.
Note
Colormap names are case-insensitive
import easychart
chart = easychart.new("column")
chart.cAxis = "reds"
chart.plot([1, 2, 3, 4, 5, 6])
chart
Each colormap can be reversed by appending .reversed
to its name.
import easychart
chart = easychart.new("column")
chart.cAxis = "reds.reversed"
chart.plot([1, 2, 3, 4, 5, 6])
chart
Each colormap can also be mirrored by appending .symmetric
to its name.
import easychart
chart = easychart.new("column")
chart.cAxis = "reds.symmetric"
chart.plot([1, 2, 3, 4, 5, 6, 7])
chart
And .reversed
and .symmetric
can be used jointly.
import easychart
chart = easychart.new("column")
chart.cAxis = "reds.reversed.symmetric"
chart.plot([1, 2, 3, 4, 5, 6, 7])
chart
Colormaps#
Selected colormaps. See here for full list of available colormaps
Perceptually uniform sequential colormaps#
Colormap name |
Example |
---|---|
plasma |
|
viridis |
|
inferno |
|
magma |
|
cividis |
Sequential colormaps#
Colormap name |
Example |
---|---|
greens |
|
bugn |
|
ylgn |
|
ylorbr |
|
ylorrd |
|
reds |
|
oranges |
|
orrd |
|
purd |
|
rdpu |
|
bupu |
|
purples |
|
pubu |
|
blues |
|
ylgnbu |
|
greys |
|
pink |
Diverging colormaps#
Colormap name |
Example |
---|---|
rdgy |
|
brbg |
|
rdbu |
|
puor |
|
piyg |
|
prgn |
|
coolwarm |
|
bwr |
|
seismic |
Cyclic colormaps#
Colormap name |
Example |
---|---|
twilight |
|
twilight_shifted |
|
hsv |
Other colormaps#
Colormap name |
Example |
---|---|
terrain |