igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] how to plot graph on matplotlib figure?


From: Tamas Nepusz
Subject: Re: [igraph] how to plot graph on matplotlib figure?
Date: Mon, 5 Jul 2010 13:44:48 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Diederik,

Hmmm, 'ctx' is an undocumented attribute of RendererCairo that should
hold the Cairo context on which matplotlib is drawing. It worked for me
with my version of Matplotlib (0.98.5.2), it looks like they have
changed something between Matplotlib 0.98.5.2 and 0.99.3. I'll try to
get hold of the most recent version and see what the new name of this
attribute is. Maybe try replacing 'renderer.ctx' with 'renderer.gc.ctx'
first, this seems to work in 0.99.1

-- 
Tamas

On Mon, Jul 05, 2010 at 08:41:11AM -0400, Diederik van Liere wrote:
> Hi Tamas,
> 
> Thanks for your code snippet, however it does not work for me. I get a:
> 
> RendererCairo instance has no attribute 'ctx'
> message, i am using igraph 0.5.3 and matplotlib 0.99.3 and cairo 1.8.10
> 
> what should I do to fix this?
> best,
> Diederik
> 
> 
> On Wed, Jun 30, 2010 at 10:39 AM, Tamas Nepusz <address@hidden> wrote:
> 
> > Hi Diederik,
> >
> > > I would like to add my graph to a matplotlib figure but don't know how.
> > I played around a bit with matplotlib today and this is what I came up
> > with (see the attachment). It works only for Cairo-based Matplotlib
> > backends as igraph supports plotting on Cairo contexts only.
> >
> > --
> > Tamas
> >
> > _______________________________________________
> > igraph-help mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/igraph-help
> >
> >

> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

[Prev in Thread] Current Thread [Next in Thread]