View

class View(graph, pixelsize=None, figure=None, figure_kwargs=None, axes=[], plot_kwargs=None, axes_kwargs=None, bar_kwargs=None, pie_kwargs=None, polygon_kwargs=None, polygoncollection_kwargs=None, contour_kwargs=None, step_kwargs=None, clabel_kwargs=None, text_kwargs=None, legend_kwargs=None, add_legend=True, **kwargs)

Create the figure.

Parameters:

graph : Drawable

A Graph or Drawable object.

pixelsize : 2-tuple of int

The requested size in pixels (width, height).

figure : matplotlib.figure.Figure

The figure to draw on.

figure_kwargs : dict, optional

Passed on to matplotlib.pyplot.figure kwargs

axes : matplotlib.axes.Axes

The axes to draw on.

plot_kwargs : dict, optional

Used when drawing Cloud, Curve drawables Passed on as matplotlib.axes.Axes.plot kwargs

axes_kwargs : dict, optional

Passed on to matplotlib.figure.Figure.add_subplot kwargs

bar_kwargs : dict, optional

Used when drawing BarPlot drawables Passed on to matplotlib.pyplot.bar kwargs

pie_kwargs : dict, optional

Used when drawing Pie drawables Passed on to matplotlib.pyplot.pie kwargs

polygon_kwargs : dict, optional

Used when drawing Polygon drawables Passed on to matplotlib.patches.Polygon kwargs

polygoncollection_kwargs : dict, optional

Used when drawing PolygonArray drawables Passed on to matplotlib.collection.PolygonCollection kwargs

contour_kwargs : dict, optional

Used when drawing Contour drawables Passed on to matplotlib.pyplot.contour kwargs

clabel_kwargs : dict, optional

Used when drawing Contour drawables Passed on to matplotlib.pyplot.clabel kwargs

step_kwargs : dict, optional

Used when drawing Staircase drawables Passed on to matplotlib.pyplot.step kwargs

text_kwargs : dict, optional

Used when drawing Pairs, Text drawables Passed on to matplotlib.axes.Axes.text kwargs

legend_kwargs : dict, optional

Passed on to matplotlib.axes.Axes.legend kwargs

add_legend : bool, optional

Adds a legend if True. Default is True.

Methods

CheckDict(arg) Check that the argument is a python dictionary.
ShowAll(**kwargs) Display all graphs.
ToUnicode(s) Convert to unicode if necessary.
close() Close the figure.
getAxes() Get the list of Axes objects.
getFigure() Accessor to the underlying figure object.
save(fname, **kwargs) Save the graph as file.
show(**kwargs) Display the graph.
__init__(graph, pixelsize=None, figure=None, figure_kwargs=None, axes=[], plot_kwargs=None, axes_kwargs=None, bar_kwargs=None, pie_kwargs=None, polygon_kwargs=None, polygoncollection_kwargs=None, contour_kwargs=None, step_kwargs=None, clabel_kwargs=None, text_kwargs=None, legend_kwargs=None, add_legend=True, **kwargs)
static CheckDict(arg)

Check that the argument is a python dictionary.

static ShowAll(**kwargs)

Display all graphs.

static ToUnicode(s)

Convert to unicode if necessary.

close()

Close the figure.

getAxes()

Get the list of Axes objects.

Refer to matplotlib.axes.Axes for further information.

getFigure()

Accessor to the underlying figure object.

Refer to matplotlib.figure.Figure for further information.

save(fname, **kwargs)

Save the graph as file.

Parameters:

fname: bool, optional

A string containing a path to a filename from which file format is deduced.

kwargs:

Refer to matplotlib.figure.Figure.savefig documentation for valid keyword arguments.

show(**kwargs)

Display the graph.

See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure.show