Description
EDIT: For an introduction and a long list of examples of this feature, see https://dss-extensions.org/dss_python/examples/Plotting/
Reproduce all plots from OpenDSS using Matplotlib and integrate them into the (DSS) plot
command. Ideally plot
, show
, visualize
, dump
and export
should be integrated somehow. Depending on the difficulty, other GitHub issues will be created per command.
Files
Relevant files from the OpenDSS source tree (items in bold are directly related to plots)
Execute/ExecHelper.pas
:DoDI_PlotCmd
,DoVisualizeCmd
,DoPropertyDump
Execute/ExportOptions.pas
:DoExportCmd
Executive/PlotOptions.pas
:DoPlotCmd
Plot/DSSGraph.pas
Plot/DSSPlot.pas
:TDSSPlot
. Can implement based onCommandLine/DSSPlot.pas
Related but doesn't seem relevant at the moment:
Forms/DlgPlotOptions.pas
Brief description
DoPlotCmd
processes plot options, setting up a TDSSPlot
object and calling its Execute
method. This indicates that we can in fact leave DoPlotCmd
unchanged for the moment and handle the plot in the TDSSPlot.Execute
method.
DoVisualizeCmd
is similar, handles the parameters/options and calls TDSSPlot.DoVisualizationPlot
. Same goes for ``, which calls TDSSPlot.DoDI_Plot
Alternatives
Two clear alternatives arise:
- Implement logic and plotting in Python.
- Use the Pascal and only pass a list of primitives to plot.
Since the first alternative seems both easier and more flexible, it will be investigated first.