![]() for use in GUI widgets selecting a colormap by readable name. Finally, the subset of colormaps that have short, readable names are available separately, accessible as cc.palette_n.fire or cc.palette_n, e.g. If you want to access the Bokeh palettes by string name, they are also collected into a dictionary named palette, so you can use cc.palette or cc.palette or cc.palette.fire whichever is more convenient. list(reversed(cc.fire)), or use subsets of them with slice notation, e.g. Because Bokeh palettes are just Python lists, you can always reverse them using normal Python syntax, e.g. These names should tab complete once cc has been imported. ![]() The same Bokeh palette is also sometimes available with a shorter name like cc.fire, which is the same object as cc.b_linear_kryw_0_100_c71. The Bokeh-compatible hex-string palettes are provided as attributes in the colorcet namespace as long names prefixed with b_. These are available as attributes in the colorcet namespace as full names with no prefix, e.g. The numerical lists are the original format, useful if you want to access the underlying numerical values. If matplotlib is installed and importable, a Matplotlib LinearSegmentedColormap (for continuous maps) or ListedColormap (for categorical maps), using normalized magnitudes, like om_list("fire". I.e., each color is represented as a tuple of three numbers, each between 0 and 1.0, such as Ī Bokeh-style palette, i.e., a Python list of RGB colors as hex strings, like There are three distinct versions for each colormap, each of which consists of 256 distinct colors:Īn ordered list of normalized RGB triples of numerical magnitudes. It’s a bit difficult to describe, but the idea is that colorcet should have at least one such form convenient for any particular application. ![]() After importing colorcet as cc, all the colormaps shown in this notebook will be available for use in different forms. ![]()
0 Comments
Leave a Reply. |