-
Notifications
You must be signed in to change notification settings - Fork 22
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
Conversation
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 |
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 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]] |
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.
Uh, is that an Elvis operator for R? I was always wondering how to do that!
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 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
.
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 it seems this is a Null coalescing operator.
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.
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 :)
all images have left: old and right: new
identifier
in showAreaAndBarPlots and passing that thescenario
column before plotting the total. Fixes mipArea does not find correct plots for totals #64size
warning ggplot2 was complaining about and replacing by linewidthcolor.dim.name
to further functions so it can be specified from outside (particularly piamInterfaces::plotIntercomparison. Will fix droplevels in mipArea etc. drop deletedinfo attribute #67Here you can find further files old vs. new so you can see I have not broken compareScenarios2 etc:
/p/tmp/oliverr/output/