pygsti.report.nested_color_boxplot

pygsti.report.nested_color_boxplot(plt_data_list_of_lists, cmapFactory, title=None, xlabels=None, ylabels=None, xtics=None, ytics=None, colorbar=True, fig=None, axes=None, size=None, prec=0, boxLabels=True, xlabel=None, ylabel=None, save_to=None, ticSize=14, grid=False)

Create a color box plot.

Creates a figure composed of colored boxes and possibly labels.

Parameters:
  • plt_data_list_of_lists (list of lists of numpy arrays) – A complete square 2D list of lists, such that each element is a 2D numpy array of the same size.
  • cmapFactory (instance of the ColormapFactory class) –
  • title (string, optional) – Plot title (latex can be used)
  • ylabels (xlabels,) – Tic labels for x and y axes. If both are None, then tics are not drawn.
  • ytics (xtics,) – Values of x and y axis tics. If None, then half-integers from 0.5 to 0.5 + (nCols-1) or 0.5 + (nRows-1) are used, respectively.
  • colorbar (bool, optional) – Whether to display a colorbar or not.
  • axes (fig,) – If non-None, use these figure and axes objects instead of creating new ones via fig,axes = pyplot.supblots()
  • size (2-tuple, optional) – The width and heigh of the final figure in inches.
  • prec (int, optional) – Precision for box labels. Allowed values are: ‘compact’ = round to nearest whole number using at most 3 characters ‘compacthp’ = show as much precision as possible using at most 3 characters int >= 0 = fixed precision given by int int < 0 = number of significant figures given by -int
  • boxLabels (bool, optional) – Whether box labels are displayed. It takes much longer to generate the figure when this is set to True.
  • ylabel (xlabel,) – X and Y axis labels
  • save_to (str, optional) – save figure to this filename (usually ending in .pdf)
  • ticSize (int, optional) – size of tic marks
  • grid (bool, optional) – Whether or not grid lines should be displayed.
Returns:

The encapsulated matplotlib figure that was generated

Return type:

ReportFigure