[graph-tool] Accessing colors

Lietz, Haiko Haiko.Lietz at gesis.org
Thu Jan 16 16:43:28 CET 2020


> > 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:
>
>     graph_tool.draw.default_cm


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?


I need this to create a legend.


Thx


Haiko

________________________________
Von: graph-tool <graph-tool-bounces at skewed.de> im Auftrag von Tiago de Paula Peixoto <tiago at skewed.de>
Gesendet: Donnerstag, 16. Januar 2020 15:48:02
An: Main discussion list for the graph-tool project
Betreff: Re: [graph-tool] Accessing colors

Am 16.01.20 um 13:33 schrieb Lietz, Haiko:
> Hi all,
>
>
> 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:

    graph_tool.draw.default_cm

Best,
Tiago

--
Tiago de Paula Peixoto <tiago at skewed.de>
_______________________________________________
graph-tool mailing list
graph-tool at skewed.de
https://lists.skewed.de/mailman/listinfo/graph-tool
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20200116/b9545a8a/attachment.htm>


More information about the graph-tool mailing list