Skip to content

Basic plot integration #3

Closed
Closed
@PMeira

Description

@PMeira

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 on CommandLine/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:

  1. Implement logic and plotting in Python.
  2. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions