Plotter: enhance output options
Current state
In the constructor of the Plotter
, the user can specify the output
format ("image", "html", "plot" etc..) and optionally an output_path
.
Plotter
has various methods creating charts and diagrams (e.g. distrib_attributes
) which return nothing and call a self._output()
method at the end. They also define the plot's name (e.g. "performance_attributes_distribution1d") that is later used as the default filename. The plots/graphs are plotly.express
figures.
self._output()
calls different plotly methods to output to different formats, according to the Plotter's output
argument.
What is needed:
- access to that default filename or a possibility to set it, e.g. as an optional argument in the Plotter's methods. I need to find this file i.a. to display it in Grasshopper.
- to export static images, possibility to optionally specify output width and height and/or scale
- (tentatively) add write to svg, pdf, jpeg formats https://plotly.com/python/static-image-export/
- or otherwise access to the original figure, e.g. return it, and output nothing in
_output()
when'output'=None
Edited by Alessandro Maissen