-
Notifications
You must be signed in to change notification settings - Fork 38
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 histogram bin adjustment ui #455
Conversation
9bda4ba
to
5a57128
Compare
@@ -18,3 +18,5 @@ def __init__(self, viewer_state): | |||
self.glue_state = viewer_state | |||
|
|||
link_glue_choices(self, viewer_state, 'x_att') | |||
|
|||
def axis_to_bins(self): |
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.
Have you tried including a vue_ prefix on this method?
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.
So I know I need to, but there's nothing behind the button just yet
|
||
def vue_axis_to_bins(self): | ||
# self.glue_state. | ||
MatplotlibHistogramMixin._update_axes(self) |
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.
You shouldn't need to inherit from or use this mixin - there should be a method on the histogram viewer state class for syncing the bins to the current limits.
d47c9af
to
c726cda
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #455 +/- ##
=======================================
Coverage 86.04% 86.04%
=======================================
Files 90 90
Lines 5224 5232 +8
=======================================
+ Hits 4495 4502 +7
- Misses 729 730 +1 ☔ View full report in Codecov by Sentry. |
1878679
to
f8bdab8
Compare
|
||
def vue_axis_to_bins(self, *args): | ||
self.glue_state.update_bins_to_view() | ||
print('Triggered axis to bins') |
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.
Can you remove the print statement?
<glue-float-field label="x-max" :value.sync="glue_state.hist_x_max" />--> | ||
</div> | ||
<div> | ||
<v-toolbar title="Toolbar"> |
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.
Is there any way to make the toolbar less imposing vertically?
|
||
<v-btn variant="outlined" small @click="axis_to_bins"> | ||
Fit Axes to Bins |
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.
I think this should be Update bins to view
- it's the bins that are being updated not the axes. And this would then match the glue-qt wording.
4b09734
to
cc89454
Compare
cc89454
to
52a3c29
Compare
Adds user interface to handle bin adjustments and fixing the axis to new bin ranges