pygsti.report.blank_boxplot¶
-
pygsti.report.
blank_boxplot
(xvals, yvals, xy_gatestring_dict, strs, xlabel='', ylabel='', scale=1.0, title='', sumUp=False, save_to=None, ticSize=20, invert=False)¶ Create only the outline of a color box plot.
This function has been useful for creating presentations containing box plots to introduce the viewer to these types of plots.
Parameters: - yvals (xvals,) – List of x and y values. Elements can be any hashable quantity, and will be converted into x and y tic labels. Tuples of strings are converted specially for nice latex rendering of gate strings.
- xy_gatestring_dict (dict) – Dictionary with keys == (x_value,y_value) tuples and values == gate strings, where a gate string can either be a GateString object or a tuple of gate labels. Provides the mapping between x,y pairs and gate strings. None values are allowed, and indicate that there is not data for that x,y pair and nothing should be plotted.
- strs (2-tuple) – A (prepStrs,effectStrs) tuple usually generated by calling get_spam_strs(...)
- ylabel (xlabel,) – X and Y axis labels
- scale (float, optional) – Scaling factor to adjust the size of the final figure.
- title (string, optional) – Plot title (latex can be used)
- sumUp (bool, optional) – False displays each matrix element as it’s own color box True sums the elements of each (x,y) matrix and displays a single color box for the sum.
- save_to (str, optional) – save figure to this filename (usually ending in .pdf)
- ticSize (int, optional) – size of tic marks
- invert (bool, optional) – If True, invert the nesting order of the nested color box plot (applicable only when sumUp == False).
Returns: rptFig – The encapsulated matplotlib figure that was generated. Extra figure info is a dict with keys:
- nUsedXs : int
The number of used X-values, proportional to the overall final figure width
- nUsedYs : int
The number of used Y-values, proportional to the overall final figure height
Return type: ReportFigure