-
Notifications
You must be signed in to change notification settings - Fork 60
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
[ENH] Visualization parameters #605
Conversation
9f7f04c
to
c9848d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! I have a few comments:
- Widgets that re-use the Spectra widget (Peakfit, Hyperspectra) are losing the ability to annotate the figures. I guess we can plan to re-add it but we should make an issue to track that
- How did you decide which visual items to put here and which ones to leave in the little menu? It seems arbitrary. It's a much nicer experience typing into the separate window and seeing your changes updated on the graph than trying to edit things one-by-one in the little drop-down. In particular, I'm thinking of the Define view range, which I find currently hard to use.
Otherwise, I didn't see any problems bringing old workflows forward into this.
Thanks,
Stuart
@markotoplak is there any chance we could merge this in the next few days? I am not sure if we have the line width changing feature available also, but I would also need that. |
1e94045
to
ed4dd4b
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #605 +/- ##
==========================================
- Coverage 89.47% 89.39% -0.08%
==========================================
Files 71 72 +1
Lines 11897 11971 +74
==========================================
+ Hits 10645 10702 +57
- Misses 1252 1269 +17 |
85fa435
to
af4617d
Compare
I added the same basic visualization parameters to the HyperSpectra widget - mostly to see if I can use a single settings window to control both visualizations. So now we need to decide where to go. I'd need advice:
And ideas? @borondics, @stuart-cls |
Very nice! I agree, axis limits and line widths should be included (line widths is a frequent request). For widgets, I agree about Preprocessor. I think Spectral Series should have it. I'm on the fence about Peak Fit: people want to use the fits plots but no one likes how awkward the current implementation makes that :) (it was only meant to show a representative few fits) |
Cool stuff!! Thanks :) I was wondering about the single parameter window possibility. The problem there will be that 1D spectra and 2D map plots require slightly different stuff that can mess up a bit the interface. I wonder if it would be nicer to have the visual settings belong to the axes and not the widget. Or somehow make two little icons in the widget status bar? Or just have one icon that would give a dropdown for the individual plots? I agree with those parameters (display limits and line width) and there is one thing I've been dreaming about and I think it prevents us using the plots in paper: figure sizing. I know that the axes sizing is hard (although that would be ideal) but we could at least try something with the window that would make the axes area always the same? |
I think the combined settings for both figures in Hyperspectra works well and is intuitive. I can't imagine a situation where you need different Title formats for the two figures. Good point about figure sizing / aspect ratio. That stuff would fit nicely in this menu as well if feasible. I reviewed what the interactive Matplotlib window exposes as GUI settings, and we've basically covered it all if we include figure sizing. |
af4617d
to
94a410c
Compare
414d52e
to
b457eb6
Compare
Inspired by wrangling visual settings with @borondics I added view range limits for spectra (where we already had them in menus). Because they work differently that they used to - whetever is typed in is strictly adhered to in all (I hope) situations - I could not reuse the old settings (the old behaviour was that a user had to apply them manually, they were just saved). I think this is not ready to be merged. Other settings can (and therefore should) be added separately. Can anyone test it out a bit? |
cf680b4
to
376c6f5
Compare
self.setText(str_or_empty(value)) | ||
|
||
|
||
@_add_control.register(FloatOrUndefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VesnaT, here I am using two of your private decorators. I think they are really useful and should be made public. That is the only way to get a new type of control into the visual settings dialog, right?
Thanks Marko, this is nice! Having the separate window to live edit the figure is a great experience. Regarding the View Range, it's quite weird now. When the View Range is active, none of the interactive figure tools work (zoom, rescale, etc). I guess this is the hard trade-off of optimizing for a particular figure, and exploring data, but this seems like too much of a swing toward the former. A possible solution is to have some visible indicator (I think pyqtgraph does this with a little "A" button for autoscaling) that shows when the fixed limits are applied vs when you are zooming around. We could add (another!) setting in the drop down to toggle between them. That would at least be explicit, which is better than the old way where it was hard to tell if the figure limits were currently applied or not. The dynamic zoom tools could then be disabled in fixed limits mode. One last thing, the "Reset" button. It's great to have a global reset but I was quite surprised to lose my figure captions when all I wanted was to reset the View Range limits! I predict this to be a future source of hair-pulling by our users. |
Yes, I know. I tried but could not think of a good compromise of actually setting view range limits and being able to explore, so then opted for two extremes: (1) no limits, free graph, explore as you will (2) limits, strict for export/display just as the user wants.
So, if I simplify, you suggest adding a setting whether to observe set limits or not? I do agree this is easy to add, but I am not sure it is needed. I am limited by the dialog here. What we could do is add a checkbox in this dialog that enables/disables limits, if this is a common-enough operation. I would not want to put that setting into the menu, because then you have two separate places for something very related and could be confusing (and would then really need some visual indicators, but I doubt even that would be enough to make it clear).
Funny, I did not notice that Reset button before. Yeah, I understand what can happen.. I hope for a single hair-splitting session per user. Perhaps we should add some space between settings and the buttons part... No idea what is the best thing to do there. |
376c6f5
to
d621cea
Compare
@borondics suggest adding some indication of axes lock. |
I have added an Information that axes are locked. Before that, I tried adding a lock symbol on the graph, but positioning it proved tedious, plus it did not seem that clear. |
b3575e5
to
094f46a
Compare
094f46a
to
5c6bc9f
Compare
No description provided.