Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upparsing bug with plotmath #60
Comments
|
Thanks for reporting this issue! Could I ask you to install the version 0.6.6 from github and let me know if things work as expected for you? install.packages("devtools")
devtools::install_github("slowkow/ggrepel@0.6.6")Also, I added an example with math expressions to the vignette: library(gridExtra)
set.seed(0)
d <- data.frame(
x = runif(30),
y = runif(30),
Parameter = c(
"prod(plain(P)(X == x), x)",
"integral(f(x) * dx, a, b)",
"lim(f(x), x %->% 0)",
rep("", 27)
)
)
p1 <- ggplot(d, aes(x, y, label = Parameter)) +
geom_point() +
geom_text_repel(
parse = TRUE, size = 8,
min.segment.length = unit(0, "lines"),
point.padding = unit(0.5, "lines"),
box.padding = unit(0.5, "lines")
) +
theme_classic(base_size = 20)
p2 <- ggplot(d, aes(x, y, label = Parameter)) +
geom_point() +
geom_label_repel(parse = TRUE, size = 8, alpha = 0.5) +
theme_classic(base_size = 20)
grid.arrange(p1, p2, ncol = 2) |
|
Thanks, appears to be working now. |
|
That solved also a problem I had with the cran version where I use a label to show a correlation in a ggplot plot. Will this get official and released soon ? great package |
|
Yes i agree with @smouksassi , will this get official and released soon ? |
|
Yes, math expressions were already available last year via Github on ggrepel version 0.6.6. See the news about changes for more details. The current version on CRAN is 0.7.0, and has some additional features and fixes detailed in the news file. Please see here for an example of how to plot math expressions with ggrepel. Would it be helpful if I create an announcement or blog post for new features and CRAN releases? |
|
Thank you :) |
|
this issue should be closed as the cran version works ! thank you for the great work and package ! |

Hi there, I can't seem to get this working:
Returns the error 'Error in x$lab != "" : comparison is not allowed for expressions'