ax = plt.gca()
gt.graph_draw(g, pos=pos, vertex_fill_color=concentration, output=fname,
vcmap=cmap, vertex_shape=groups, vertex_size=7, mplfig=ax)
#plt.colorbar()
This results in all my nodes just being black instead of shades of blue as they are if I don't use mplfig. Additionally, I would like colorbar() to use the vertex property concentration, but I can't find any information on how I might be able to do this.
Your help is greatly appreciated!
Regards
Alexandra
On Tue, 1 Mar 2016 at 10:14 Tiago de Paula Peixoto <
tiago@skewed.de> wrote:
On 29.02.2016 12:11, Alexandra Diem wrote:
> Cheers, I managed to get the colours consistent with your
> suggestion. One more thing I forgot to ask in my original post, is
> there a way to display a colour legend with the graph plot?
The only way to do that is to embed the drawing into a matplotlib figure
(via the mplfig parameter of graph_draw()), and then insert a legend
from there.
Best,
Tiago
--
Tiago de Paula Peixoto <tiago@skewed.de>
_______________________________________________
graph-tool mailing list
graph-tool@skewed.de
http://lists.skewed.de/mailman/listinfo/graph-tool