Visualization

GraphLab Create includes GraphLab Canvas, a built-in visualization platform and web application designed to compliment the GraphLab Create data science and development workflow. GraphLab Canvas can be used interactively in a browser-based application or directly via API methods.

Visualizing GraphLab data structures in GraphLab Canvas

GraphLab Canvas allows you to explore interactive visuals and a table of the data in an SFrame, SGraph and SArray in the local machine’s default browser or inside an IPython Notebook or Jupyter Notebook. To launch GraphLab Canvas and generate views of these data structures, simply call .show() on a supported GraphLab Create data structure. Subsequent calls of .show() will update the GraphLab Canvas session.

Details on the use of GraphLab Canvas with GraphLab Create data structures are provided below. In addition to the API documentation, please see the data science Gallery, How-tos, and the visualization chapter of the User Guide for more details and extended examples.

Resuming GraphLab Canvas after ending browser session

The GraphLab Canvas session is hosted by the GraphLab Create Python session. While the GraphLab Create Python session is active you can re-launch GraphLab Canvas and resume its prior state.

>>> gl.canvas.show()

Using GraphLab Canvas with IPython Notebook or Jupyter Notebook

GraphLab Canvas .show() methods can be used in IPython Notebook or Jupyter Notebook. By default, .show() will launch GraphLab Canvas in the browser. Optionally, you can output a single GraphLab Canvas view to an IPython Notebook or Jupyter Notebook cell using the set_target() method, as follows:

>>> gl.canvas.set_target('ipynb')

In the same session, you can set the output to the browser using

>>> gl.canvas.set_target('browser')

Methods

SFrame.show([columns, view, x, y]) Visualize the SFrame with GraphLab Create canvas.
SGraph.show([vlabel, vlabel_hover, vcolor, ...]) Visualize the SGraph with GraphLab Create canvas.
SArray.show([view]) Visualize the SArray with GraphLab Create canvas.
canvas.show() Re-launch and resume the prior GraphLab Canvas session in default browser.
canvas.set_target(target[, port]) Set the target for GraphLab Canvas view output.