[graph-tool] Accessing colors
Tiago de Paula Peixoto
tiago at skewed.de
Thu Jan 16 17:35:51 CET 2020
Am 16.01.20 um 16:43 schrieb Lietz, Haiko:
>> > How can I access the (r, g, b, alpha) tuples used by default when using
>> > graph_draw()?
>> The default color map used can be accessed via:
> I want to extract the exact colors used by default in coloring vertices.
> For example vertex_fill_color=0 is turquoise
> (graph_tool.draw.default_cm(0)), 1 is yellow
> (graph_tool.draw.default_cm(300)), ...
> How can I access the exact colors used in graph drawing?
The default colors are extracted from that color map, by normalizing the
property map values into the color map's range. In other words, the
smallest value will correspond to the first color, and the largest value
to the last color.
Tiago de Paula Peixoto <tiago at skewed.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the graph-tool