autofig.figure.Figure.to_dict (function)


def to_dict(self, renders=[])

Export the current autofig.figure.Figure to a json-safe dictionary.

See also: * autofig.figure.Figure.save

Arguments

  • filename (string): path to save the figure instance.
  • renders (list of dictionaries, default=[]): commands to execute for rendering when opened by the command-line tool or by passing do_renders to autofig.figure.Figure.open. The format must be a list of dictionaries, where each dictionary must at least have 'render': 'draw' or 'render': 'animate'. Any additional key-value pairs will be passed as keyword arguments to the respective rendering method.

Returns

  • (str) the path of the saved figure instance.