Skip to content
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

Add right-click context menu to scatter plot widget #19

Open
cudmore opened this issue Apr 26, 2024 · 3 comments
Open

Add right-click context menu to scatter plot widget #19

cudmore opened this issue Apr 26, 2024 · 3 comments
Assignees

Comments

@cudmore
Copy link
Member

cudmore commented Apr 26, 2024

The scatter plot widget should have a right-click context menu to set values of the selected spines.

Something like

  • Accept: Set all selected spines to Accept=True
  • Reject: Set all selected spines to Accept=False
  • User Type: have a submenu with items [0,9], set all selected spines to selected user type (selected menu)
  • Delete: Delete all selected spines. Should have a dialog popup to ask 'are you sure you want to delete'

This will be similar to (but different) from the context menu in imagePlotWidget.

For example, in the scatter menu we have separate Accept and Reject menu action to set a multi point selection to one or the other. In the imagePlotWidget we are always working with just one point selection and thus can toggle `Accept'.

Same goes for the submenu [0,9] for userType. We don't need to set a check for the given selection. When the user selects a userType action [0,9] we whole sale set all selected spines to that value.

Remember, if no spines are selected in the scatter then there will be no context menu show. Alternatively, we can show it but make sure the actions are disabled.

@cudmore
Copy link
Member Author

cudmore commented May 9, 2024

You can have a look at some SanPy code for how to extend scatter plot to include (scatter plot, histogram, cumulative histogram).

Look at L1214 in bScatterPlotWidget2.py.

Where the code in bScatterPlotWidget2.py is the 'backend', it does not (should not?) know anything about SanPy.

@cudmore
Copy link
Member Author

cudmore commented May 9, 2024

Hey @jtle00,

Some more little things on the scatter plot. (1) Add X and Y axis labels with the name of plotted stats, (2) add checkbox to turn MPL toolbar on/off.

@jtle00
Copy link
Contributor

jtle00 commented May 15, 2024

I have implemented these improvements for the scatter plot widget. They can be seen in the branch johnson-dev.
Side-note: Delete spine needs to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants