scale_color_viridis ¶
scale_color_viridis(
alpha: Number | None = None,
begin: Number | None = None,
end: Number | None = None,
direction: int | None = None,
option: str | None = None,
name: str | None = None,
breaks: Breaks | None = None,
labels: Labels | None = None,
lablim: int | None = None,
limits: Limits | None = None,
na_value: Color | Number | None = None,
guide: Guide | None = None,
trans: Transform | None = None,
format: str | None = None,
) -> FeatureSpec
Map color with a viridis-family color map.
Parameters:
-
alpha(float, default:1) –Opacity.
-
begin(float, default:0, 1) –Part of the color map to use.
-
end(float, default:0, 1) –Part of the color map to use.
-
direction((1, -1), default:1) –-1 reverses the colors.
-
option(str, default:"viridis") –"magma" ("A"), "inferno" ("B"), "plasma" ("C"), "viridis" ("D"), "cividis" ("E"), "turbo" or "twilight".
-
name(str, default:None) –Legend title.
-
breaks(list, default:None) –Values that get a legend key or a colorbar tick.
-
labels(list of str or dict, default:None) –One label per break (a dict maps breaks to labels).
-
lablim(int, default:None) –Maximum label length in characters; longer labels are cut.
-
limits(list, default:None) –[low, high]data range of a continuous scale, or the levels (and their order) of a discrete one. Data outside the limits getsna_value. -
na_value(str, default:None) –Value drawn for missing data and data outside
limits. -
guide(str or FeatureSpec, default:None) –"legend","colorbar"(continuous color),"none", or aguide_legend()/guide_colorbar()spec. -
trans((identity, log10, log2, sqrt, reverse), default:"identity") –Transformation of the data.
-
format(str, default:None) –Label format: a number format (
".2f",",","%") or a template ("{.1f} %").labelstake precedence.
Returns:
-
FeatureSpec–The scale.