[Biopython-dev] Bio.Graphics to return a matplotlib axis?

Peter Cock p.j.a.cock at googlemail.com
Mon May 19 09:16:14 EDT 2014


Hi Asma,

The different submodules under Bio.Graphics are all different
(I think you are using GenomeDiagram), but they all use
ReportLab as the backend - which can produce PDF, PS, SVG,
PNG etc.

I think it would require a major rewrite to get matplotlib constructs
out... so your best bet would be export a suitable image which
can be imported into matplotlib - or the otherway round and
take an image from matplotlib into a composite image in
ReportLab?

If possible, try to use a vector image (e.g. PDF, PS, SVG) rather
than a bitmap (e.g. PNG, JPG) for best quality.

Peter

On Mon, May 19, 2014 at 12:34 PM, Asma Riyaz <asmariyaz23 at gmail.com> wrote:
> Hello,
>
> I generated a genome diagram using Bio.Graphics and a phylogenetic tree
> using Bio.Phylo, further I wanted merge these two hence I used matplotlib.
> Bio.Phylo returns a matplotlib axis which enabled me to plot it in
> matplotlib but Bio.Graphics does not return any such axes(to the level of
> my understanding) and hence I plotted a .png(using matplotlib) returned by
> it to merge them.
>
> My question is this: will it future beneficial to have Bio.Graphics return
> such an axis? Any inputs?
> (Also attaching a sample of an image I generated).
>
> Thank you,
> Asma
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>


More information about the Biopython-dev mailing list