DynamicGravitySystems / DGP

Dynamic Gravity Processor
http://dgp.readthedocs.io/en/develop/
Apache License 2.0
7 stars 4 forks source link

Feature/plot api #81

Closed bradyzp closed 5 years ago

bradyzp commented 5 years ago

Plot API Feature Branch

Resolves #37 Resolves #54 Closes #36

Overview This is a major re-write of the core plotting wrappers/helpers/integration-framework (hopefully for the last time :) ). The primary modules of interest here are located in the dgp/gui/plotting/ package:

The plotting API for use within DGP has been re-written and cleaned up significantly, with various enhancements and improvements made. The new API is based exclusively on the pyqtgraph library due to its interactive performance.

Features/Improvements

ToDo (Future Goals) Add an export mechanism for exporting/generating static images from plotted data (possibly use Matplotlib to create pretty non-interactive plots). Note that I have disabled/removed the export functionality that pyqtgraph provides as many of its functions don't work correctly or cause runtime errors.

Save/restore plot state, enable user to select to track the plot state, so that data items can be re-plotted automatically when opening/closing a tab.

Enable fine-tuned control and/or creation of LinearSegments on the LineSelectPlot, allowing the user to adjust the left/right bounds via a dialog, and possibly a dialog which would enable the input of specific time ranges to create a series of segments.

bradyzp commented 5 years ago

Latest commit adds new toolbar factory methods to the plotting base class. The PlotTab and TransformTab have been refactored slightly to make use of the new toolbar instead of defining its own plot-control actions.

This should resolve the attribute error encountered due to the missing selection_mode property. And removes the dead-code that was noted above.

Note The icons for the new toolbars have not been added to the project in this branch and so will show up simply as buttons with text. This will be fixed in an upcoming feature branch as I didn't want to pollute this branch with the addition/deletion of a bunch of icon/resource files.