-
Notifications
You must be signed in to change notification settings - Fork 25
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
New plotting page #110
New plotting page #110
Conversation
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 like this new way of selecting multiple responses! How about adding a label with the response name to each plot, so its clear which plot is showing which response when multiple responses are selected?
52a8c6f
to
26430cd
Compare
25f5360
to
2a137ee
Compare
7a8e5ca
to
5076b88
Compare
@@ -107,7 +107,7 @@ | |||
"margin": { | |||
"l": 5, | |||
"b": 5, | |||
"t": 5, | |||
"t": 25, |
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 we want to increase margin?
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.
yes the menu was covering the top plot in the legend
n_clicks = 0 if n_clicks is None else n_clicks | ||
if n_clicks % 2 == 0: | ||
def update_ensemble_selector_view_size( | ||
n_clicks, class_name, class_name_container, maximized |
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.
Looks like n_clicks is not in use anymore, maybe it can be replaced by underscore?
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.
👍
@@ -58,7 +58,10 @@ def update_ensemble_selector(selected_ensembles, _, elements): | |||
ctx = dash.callback_context | |||
triggered_id = ctx.triggered[0]["prop_id"].split(".")[0] | |||
|
|||
if triggered_id == parent.uuid("ensemble-selection-store"): | |||
if ( |
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.
Could you, maybe, make the function name more descriptive for update_ensemble_selector
? Function update_ensemble_selection
is fine!
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.
renamed to update_ensemble_selector_graph
78d4f25
to
4ce78cb
Compare
@@ -0,0 +1,88 @@ | |||
# Could go into seperate file |
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 guess this comment can be removed now?
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.
👍
) | ||
def update_parameter_options(selected_ensembles): | ||
def update_parameter_options(selected_ensembles, _, prev_plot_selection): |
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.
Do we want an underscore prefix here? (And on the rest of all callback functions?)
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 would actually rather have it only on functions in the files that are not callbacks ;)
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 that makes sense 👍 I was just wondering as some callback functions has underscore prefixes and some does not.
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 made a commit to clean up the style :)
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.
Nice! I like consistency 👍
@@ -73,6 +76,7 @@ def update_ensemble_selector(selected_ensembles, _, elements): | |||
element["data"].update( |
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.
This updates ensemble regardless it's selected or not, is it intentional? Ok, got it now :)
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.
yes, because it should remove the color if it is not selected
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.
Sure, I deleted the comment as I grasped the code in the end :)
c737a41
to
7cdd4e4
Compare
if not selected_ensembles: | ||
raise PreventUpdate | ||
|
||
if dash.callback_context.triggered[0]["prop_id"].split(".")[0] == parent.uuid( |
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.
The parameter-selector
is not longer among inputs, so can go away I reckon.
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.
It has already been removed 🤷
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 still see it there though:
if dash.callback_context.triggered[0]["prop_id"].split(".")[0] == parent.uuid(
"parameter-selector"
):
bin_count = None
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.
removed now
) | ||
def _update_histogram(parameter, hist_check_values, bin_count, selected_ensembles): | ||
def update_histogram( |
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.
Where's the prior checkbox gone?
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.
Now, the check-box prior is there again - weird ... need to do some more tests or it might be some caching issue :)
Could you also replace in style.update({"line": {"color": color}}) which actually overwrites the entire line style just the color only to: style["line"]["color"] = color
style_mean = deepcopy(style)
style_mean["line"]["dash"] = "solid" while updating the mean mean_data = PlotModel(
x_axis=x_axis, y_axis=_mean, text="Mean", name="Mean", **style_mean
) |
I thnk this is outside the scope of this issue..... it is already quite big |
Looks very good! One "annoying" thing - at least for me - is that i really want an opportunity to shuffle around the charts after i've added what i want.... 🤔 Not sure if it is possible or wise to this right now, just a thought i had while using it 😄 |
I do not think that will be possible with setup as it is today.. Could be something to investigate in the future |
92c2008
to
49a314f
Compare
parameters = [] if not parameters else parameters | ||
responses = [] if not responses else responses | ||
current_selection = [] if not current_selection else current_selection | ||
for plot in current_selection.copy(): |
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.
How does this work? Is the copy created upfront or every cycle a new copy?
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.
Only in the beginning
Add integration test for new plotting page
49a314f
to
7b4e9ed
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.
Tested and worked smoothly! Very good job!
92aeb45
to
743dfca
Compare
This is the start of having a single page, and user defined layout of various plots (param distributions, response plots, etc...). As of now only response plots are visible.
New selection widget should be included as soon as parallel coord is merged
Persistence for ensemble selector and response selector is now working (sort of)
resolves #72