Thanks for you reply! I'm not sure I really understand how this works
properly, the only example I could find is here:
http://stackoverflow.com/questions/34425955/make-coordinate-systems-agree-between-matplotlib-and-graph-tool
so
I tried something similar for my plot:

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 <[email protected]> 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 <[email protected]>
>
> _______________________________________________
> graph-tool mailing list
> [email protected]
> http://lists.skewed.de/mailman/listinfo/graph-tool
>
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to