# Introduction to Workspace objects¶

This tutorial briefly explains how pyGSTi visualizes data using Workspace objects. Understanding the basics covered here will help demystify the creation of plots and tables in other tutorials.

PyGSTi prefers to use HTML-based figures (native HTML tables and Plotly plots) over the perhaps more traditional LaTeX tables and matplotlib plots. There are several reasons for this:

1. Interactivity - HTML allows plots and tables to be interactive; with LaTeX this is impossible and with matplotlib it's painful.
2. HTML's ability to be integrated into web pages (making nicer reports than a many-page PDF) and into Jupyter notebooks.
3. Portability - Plotly figures (HTML and JS) can be more robustly stored and transported (e.g. over the web) than matplotlib Figure objects, which are difficult even to pickle with Python.

The creation of (HTML) figures, both tables and plots, is handled by the pygsti.report.Workspace factory object.

In [1]:
import pygsti
ws = pygsti.report.Workspace()


Within an IPython notebook like this one, we can create figures in notebook cells by calling (once, usually at the beginning of the notebook):

In [2]:
ws.init_notebook_mode(autodisplay=True)