We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Before ggplot v2.0.0 the following piece of code worked without problems
library(ggplot2) x <- (1:8) y <- sin(x) z <- letters[1:2] dat <- data.frame(x, y, z) g <- ggplot(dat, aes(x, y, group = z, colour = z, fill = z)) + geom_area(alpha = 0.5) t <- theme_bw() + theme(legend.position = "bottom") g + t # now with half height legend keys t1 <- t + theme(legend.key.height = 0.5 * t$legend.key.size ) g + t1
Now, with ggplo2 v.2.0.0 I get the error message:
> Error in FUN(X[[i]], ...) : Unknown input
It seems that theme() does no longer accept objects of class unit.arithmetic. WORKAROUND:
t2 <- t + theme(legend.key.height = unit(0.5 * as.numeric(t$legend.key.size), attr(t$legend.key.size, "unit"))) g + t2
May be I'm have missed a point. Best regards, Uwe
The text was updated successfully, but these errors were encountered:
A considerably simpler reprex is:
df <- data.frame(x = 1:3, y = 1:3) ggplot(df, aes(x, y, fill = factor(x))) + geom_tile() + theme(legend.key.height = 2 * unit(1, "lines"))
Sorry, something went wrong.
c877eaf
No branches or pull requests
Before ggplot v2.0.0 the following piece of code worked without problems
Now, with ggplo2 v.2.0.0 I get the error message:
It seems that theme() does no longer accept objects of class unit.arithmetic.
WORKAROUND:
May be I'm have missed a point.
Best regards,
Uwe
The text was updated successfully, but these errors were encountered: