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

A global variable refering to the GUI plotting window #407

Open
jbrochar opened this issue Aug 3, 2022 · 1 comment · May be fixed by #761
Open

A global variable refering to the GUI plotting window #407

jbrochar opened this issue Aug 3, 2022 · 1 comment · May be fixed by #761
Assignees

Comments

@jbrochar
Copy link

jbrochar commented Aug 3, 2022

One eventual issue that users might face is the interference between there plots and PsPM plots.

A way to resolve this would be to adjust the "plot-able" property of the PsPM's windows dynamically.
If every PsPM plotting functions had access to a global variable refering to the main figure to plot, they could switch it to "plot-able", do their things and then switch it back to "unplot-able".

@teddychao teddychao self-assigned this Sep 27, 2022
@teddychao teddychao linked a pull request Aug 12, 2024 that will close this issue
@teddychao teddychao linked a pull request Aug 12, 2024 that will close this issue
@teddychao
Copy link
Contributor

Hi @dominikbach let me explain it here.

  1. The reason why users accidentally plot on PsPM UI is, PsPM UI will accept command line so that plots are directly delivered to them.
  2. The method of avoiding 1 is to make the property HandleVisibility of the component to be "off".
  3. When users want to use any UI, either by clicking buttons or using command line, the property HandleVisibility must be callback rather than off.
  4. Some functions require user interaction, for example pspm_display, because users want to select channels they want to check. When users are selecting, the UI is under the status "waiting". During "waiting", HandleVisibility must be callback, otherwise it will crash.

Therefore, I can provide three scenarios.

  1. If the user would like to use UI only without typing anything on command line, we can set HandleVisibility to be callback for them.
  2. If the user would like to use command line only without clicking anything, we can set HandleVisibility to be off for them.
  3. If the user wants to use them both, it becomes complicated... Some functions can be in status of waiting such as data editor for interacting with UI, so HandleVisibility shall be callback. This also risks because users may want to type command line to plot.

As the solution, I think type 2 users can use script to set HandleVisibility to be off when they plot (similar to hold on command in Matlab) to avoid plotting on UI. Type 3 users need to do this every time when they want. For type 1 users, we shall make the UI always be HandleVisibility = callback because they do not type commands.

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

Successfully merging a pull request may close this issue.

2 participants