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, square_axes=False, **kwargs)

Create the figure.

Parameters
graphDrawable

A Graph or Drawable object.

pixelsize2-tuple of int

The requested size in pixels (width, height).

figurematplotlib.figure.Figure

The figure to draw on.

figure_kwargsdict, optional

Passed on to matplotlib.pyplot.figure kwargs

axesmatplotlib.axes.Axes

The axes to draw on.

plot_kwargsdict, optional

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

axes_kwargsdict, optional

Passed on to matplotlib.figure.Figure.add_subplot kwargs

bar_kwargsdict, optional

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

pie_kwargsdict, optional

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

polygon_kwargsdict, optional

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

polygoncollection_kwargsdict, optional

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

contour_kwargsdict, optional

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

clabel_kwargsdict, optional

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

step_kwargsdict, optional

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

text_kwargsdict, optional

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

legend_kwargsdict, optional

Passed on to matplotlib.axes.Axes.legend kwargs

add_legendbool, optional

Adds a legend if True. Default is True.

square_axesbool, optional

Forces the axes to share the same scale if True. Default is False.

Methods

CheckDict(arg)

Check that the argument is a python dictionary.

ShowAll(\*\*kwargs)

Display all graphs.

ToUnicode(s)

Convert to unicode if necessary.

close(self)

Close the figure.

getAxes(self)

Get the list of Axes objects.

getFigure(self)

Accessor to the underlying figure object.

save(self, fname, \*\*kwargs)

Save the graph as file.

show(self, \*\*kwargs)

Display the graph.

__init__(self, 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, square_axes=False, \*\*kwargs)

Initialize self. See help(type(self)) for accurate signature.

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(self)

Close the figure.

getAxes(self)

Get the list of Axes objects.

Refer to matplotlib.axes.Axes for further information.

getFigure(self)

Accessor to the underlying figure object.

Refer to matplotlib.figure.Figure for further information.

save(self, 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(self, \*\*kwargs)

Display the graph.

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