Skip to content

Feature/#48 plotter #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 14, 2017
Merged

Feature/#48 plotter #53

merged 6 commits into from
Dec 14, 2017

Conversation

bradyzp
Copy link
Member

@bradyzp bradyzp commented Dec 12, 2017

Resolves #48

Re-write of plotter.py
Also some significant updates to models.py code for the ChannelListModel, improving some of the drag-n-drop logic.

Added a mock interface for the Transform tab, displaying a plot and an example UI layout for the Transform selection tree.

Added significant documentation across modules: plotter.py, models.py, and types.py

Enh: Implement twin Y axis scales on plots.
Enh: Improve Plotter sub-plot generation code. Allow the layout to be
re-initialized with different parameters.
Enh: Add prototype interface for Transform functionality on Flight
sub-tab.
Fix: Fixed behavior of ChannelListModel when it is used in multiple instances
- i.e. on the main plot, and the transform plot. The DataSource class
was modified to return a unique set of DataChannels, instead of creating
a single instance of each channel, which could then be mutated by
multiple models - leading to unexpected behavior.
ENH: Large re-write of the plotter.py module, including most of
LineGrabPlot class. Added AxesGroup and PatchGroup classes to
conceptually group related Axes and Patches (Flight Lines) to ease the
process of doing batch operations on the plots.
ENH: Implemented contextual cursors that change dependant on mouse
location on the plot (e.g. drag handles at edge of flight lines)
FIX: Fixed/improved proximity calculations by using percentage system
which scales the proximity values based on the X-limits of the axes.
DOC: Added more documentation to new classes/methods.
Fixed plot scaling issues e.g. when user plotted a data line while
zoomed in on an Axes, using the default Home button on the MPL toolbar
would create undesired results.

Re-implemented plot resampling method to up/down-sample data based on
zoom level for some performance gains in the interactive plot.
@cbertinato
Copy link
Collaborator

When adding a flight to a new project:

File "/Users/chrisbert/Documents/Git/DGP/dgp/gui/widgets.py", line 101, in _init_model
    plot_model = models.ChannelListModel(channels, len(self._plot))
TypeError: object of type 'LineGrabPlot' has no len()

Fix bug when creating new flight due to code modification in the
BasePlottingCanvas class. __len__ method has now been added to the
LineGrabPlot.
@cbertinato
Copy link
Collaborator

These are all minor with regard to the overall functionality, so if you want to make these new issues instead of including them in this PR, then I'm ok with that.

  1. When a label is removed (by setting label with an empty string) the current behavior is to display 'None'. I suggest we catch this case and display an empty string.

  2. Another thing that may not have been in the original functionality before the refactoring: when zoomed and moving a patch, the label stays centered with the patch. This is a question of desired behavior. Do we keep the label centered with the part of the patch that is visible if not all of the patch is within the axes?

  3. When a label is set, the patch remains invisible until the mouse pointer moves.

  4. When a user zooms into a patch with a label, then the label does not re-center on the patch only in the axes in which the zoom action occurred until another action is taken.

  5. Labels are behind channel traces in some cases. Need to probe more to determine the conditions for this behavior.

Fixed patch not drawing after label is set until mouse movement.
Fixed text display when label is removed to display empty string.
Fixed label position not updating/drawing on zoom in axes where zoom occured.
@bradyzp bradyzp merged commit 65acf58 into develop Dec 14, 2017
@bradyzp bradyzp deleted the feature/#48-plotter branch December 19, 2017 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants