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

Legend is not accurate in plot_predictions() #152

Closed
Bisaloo opened this issue Nov 23, 2021 · 1 comment
Closed

Legend is not accurate in plot_predictions() #152

Bisaloo opened this issue Nov 23, 2021 · 1 comment

Comments

@Bisaloo
Copy link
Member

Bisaloo commented Nov 23, 2021

example1 <- scoringutils::continuous_example_data

scoringutils::plot_predictions(example1, x = "value_date",
                               filter_truth = list('value_date <= "2020-06-22"',
                                                   'value_date > "2020-05-01"'),
                               filter_forecasts = list("model == 'SIRCOVID'",
                                                       'creation_date == "2020-06-22"'),
                               facet_formula = geography ~ value_desc)

Created on 2021-11-23 by the reprex package (v2.0.1.9000)

The colours in the legend do not match precisely what is visible on the plot because the colours on the plot result from the overlap of various ribbons (with alpha = 0.4). The colours on the plot are effectively darker than what is specified on the legend.

A solution might be to remove alpha = 0.4? If the quantiles are ordered correctly and since we plot median & truth data afterwards, I can't think of anything that might be under the ribbons.

@nikosbosse
Copy link
Contributor

👍 sounds good. Do you want to do that or shall I?

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