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

fix legend titles, units, total plots #68

Merged
merged 1 commit into from
May 3, 2023

Conversation

orichters
Copy link
Contributor

@orichters orichters commented May 3, 2023

all images have left: old and right: new

  • if all data is from the same model, state that in the legend title and shorten the line description.

image

  • if all data is from the same scenario, state that in the legend title and shorten the line description.

image

image

  • fix strange coloring where multiple models had the same color

image

Here you can find further files old vs. new so you can see I have not broken compareScenarios2 etc: /p/tmp/oliverr/output/

AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
- '''.*'' is needed for checks on size reduction of PDFs'
- was deprecated in ggplot2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new tests complain:

`aes_()` was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation idioms with `aes()`
───────────────────────────────────────────
`aes_string()` was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation ideoms with `aes()`

But I think we can live with that at the moment until somebody knows how to fix that…

@@ -58,7 +58,7 @@ mipLineHistorical <- function(x,x_hist=NULL,color.dim="identifier",linetype.dim=
if(all(is.na(x$scenario))) x$scenario <- ""
if(all(is.na(x$model))) x$model <- ""
if (! "identifier" %in% names(x)) x$identifier <- identifierModelScen(x)
color.dim.name <- paste(c(color.dim.name, attr(x$identifier, "deletedinfo")), collapse = " ")
if (is.null(color.dim.name)) color.dim.name <- c(attr(x$identifier, "deletedinfo"), "Model output")[[1]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, is that an Elvis operator for R? I was always wondering how to do that!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never heard of "Elvis operator", but this does not seem to be such an implementation, because it does not return attr(x$identifier, "deletedinfo") if it evaluates to TRUE, but if it does not evaluate to NULL.

Copy link
Contributor Author

@orichters orichters May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems this is a Null coalescing operator.

Copy link
Contributor Author

@orichters orichters May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c(intersect(a, TRUE), b)[[1]] is Elvis, I guess :)

No, it is isn't, because Elvis operator means b is not even evaluated. So forget all that :)

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 this pull request may close these issues.

droplevels in mipArea etc. drop deletedinfo attribute mipArea does not find correct plots for totals
2 participants