makePisaFigure

Make a PISA plot or graph (depending on the input json).

BNF

<make-figure-configuration> ::=
    {
        "graph-configs": [<list-of-graph-config>]
        "plot-configs": [<list-of-plot-config>]
        «"width": <integer>»
        «"height": <integer>»
        «"output-png": <file-name>»
        «"output-pdf": <file-name>»
        «"output-gui": <boolean>»
        «"dpi": <integer>»
        «"transparent": <boolean>»
        <verbosity-section>
    }
<list-of-plot-config> ::=
    <empty>
  | <pisa-plot-configuration>«, <list-of-plot-config
<list-of-graph-config> ::=
    <empty>
  | <pisa-graph-configuration>«, <list-of-graph-config

Parameter notes

graph-configs, plot-configs

A list of configurations appropriate for the functions in plotting. At least one of these must be present, and you can have both.

output-png, output-pdf

The name you want your figure saved as. You can specify both in order to have both a pdf and png saved of the same figure. If you specify both output-gui and also save the figure with output-png or output-pdf, then the figure will be saved before any manipulation in the GUI.

width, height

(optional) The width and height of the generated figure, in inches. Default: width 7, height 5.

dpi

(optional) Only relevant when you render to a png, this determines the resolution. Default: 300

transparent

(optional) Should the figure have a transparent background? Default: False

output-gui

(optional) Should the figure be displayed with plt.show()? Default: False.

The configuration dictionaries for the individual plots and graphs are detailed at plotting.

bpreveal.makePisaFigure.makePisaFigure(cfg)

Actually make the plot(s).

Parameters:

cfg (dict) – The configuration dictionary for all the figures

Return type:

None

bpreveal.makePisaFigure.main()

A zero-argument wrapper around the main function.

Return type:

None

Schema

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "makePisaFigure",
    "description": "Schema for making PISA figures",
    "type": "object",
    "properties": {
        "graph-configs": {
            "type": "array",
            "items": {"$ref": "/schema/pisaGraph#/definitions/graph-config"}
        },
        "plot-configs": {
            "type": "array",
            "items": {"$ref": "/schema/pisaPlot#/definitions/plot-config"}
        },
        "width": {"type": "integer"},
        "height": {"type": "integer"},
        "dpi": {"type": "integer"},
        "transparent": {"type": "boolean"},
        "output-png": {"type": "string"},
        "output-pdf": {"type": "string"},
        "output-gui": {"type": "boolean"},
        "verbosity": {"$ref": "/schema/base#/definitions/verbosity"}
    },
    "allOf": [
        {"anyOf": [
            {"required": ["graph-configs"]},
            {"required": ["plot-configs"]}
        ]},
        {"anyOf": [
            {"required": ["output-png"]},
            {"required": ["output-pdf"]},
            {"required": ["output-gui"]}
        ]}
    ],
    "additionalProperties": false
}