autowisp.browser_interface.core.plot_utils module

Class Inheritance Diagram

Inheritance diagram of JsonResponse, StringIO

Shared plot constants and utilities for BUI views.

autowisp.browser_interface.core.plot_utils.figure_to_svg_response(fig, **extra)[source]

Serialize a matplotlib figure to SVG and return a JsonResponse.

Parameters:
  • fig – The matplotlib Figure to serialize and close.

  • **extra – Additional key/value pairs to include in the JSON response alongside plot_data.

Returns:

JsonResponse with plot_data containing the SVG string.

autowisp.browser_interface.core.plot_utils.setup_svg_matplotlib()[source]

Configure matplotlib to render SVG with dark background.