dragonn.plot module¶
-
dragonn.plot.
PolygonPatch
(polygon, **kwargs)[source]¶ Constructs a matplotlib patch from a geometric object
The polygon may be a Shapely or GeoJSON-like object with or without holes. The kwargs are those supported by the matplotlib.patches.Polygon class constructor. Returns an instance of matplotlib.patches.PathPatch.
Example (using Shapely Point and a matplotlib axes):
>>> b = Point(0, 0).buffer(1.0) >>> patch = PolygonPatch(b, fc='blue', ec='blue', alpha=0.5) >>> axis.add_patch(patch)
-
dragonn.plot.
PolygonPath
(polygon)[source]¶ Constructs a compound matplotlib path from a Shapely or GeoJSON-like geometric object
-
dragonn.plot.
add_letter_to_axis
(ax, let, x, y, height)[source]¶ Add ‘let’ with position x,y and height height to matplotlib axis ‘ax’.
-
dragonn.plot.
add_letters_to_axis
(ax, letter_heights)[source]¶ Plots letter on user-specified axis.
ax : axis letter_heights: Nx4 array
-
dragonn.plot.
plot_bases
(letter_heights, figsize=(12, 6), ylab='bits')[source]¶ Plot the N letters with heights taken from the Nx4 matrix letter_heights.
letter_heights: Nx4 array ylab: y axis label
pyplot figure
-
dragonn.plot.
plot_motif
(motif_name, figsize, ylab='bits', information_content=True)[source]¶ Plot motifs from encode motifs file