Closed Roctober92 closed 5 years ago
Has anyone found of solution to this? I think it may have to do with an updated version of ggplot2 or trelliscopejs
@jpn5089 I have not found a solution to it yet, nor has the author I believe. Do you think I need to update ggplot2? Or that that trelliscopejs was not written for the updated version I have?
@Roctober92 I just installed ggplot2 (3.0.0) and trelliscopejs (0.1.13) and ran this code successfully
`library(trelliscopejs) library(ggplot2)
x <- factor(LETTERS[1:4]); names(x) <- letters[1:4]
data <- data.frame(var = rep(x,10), x = seq(1,40,1), y = seq(1,200,5))
ggplot(data, aes(x,y)) + geom_point() + facet_trelliscope(~var, path = "C://R Projects/") `
@Roctober92 I think it has something to do with the x-axis variable being of some sort of class date. See 2 examples below:
x <- factor(LETTERS[1:4]); names(x) <- letters[1:4]
data_year_date <- data.frame(year = structure(seq(1950,1989,1), class = "Date"), var = rep(x,10), y = seq(1,200,5))
ggplot(data_year_date, aes(year,y)) + geom_point() + facet_trelliscope(~var)
data_year_character <- data.frame(year = structure(seq(1950,1989,1), class = "Date"), var = rep(x,10), y = seq(1,200,5)) %>% mutate(year = as.character(year))
ggplot(data_year_character, aes(year,y)) + geom_point() + facet_trelliscope(~var)
I am having the same issue just by having a Date column in the dataframe sent to ggplot2.
@dinhani i've found that ggplot 2.2.1 and trelliscopejs 0.1.11 allow you to get the plots to render correctly, if you happen to have those package versions located in older projects, etc
Hi @dinhani, @Roctober92, I get the same bug because of time variable as the x-axis. The temporal solution is to check the data type of time variable, like t = as.numeric(t)
. But in this way, I geta ugly x-axis.
Looking into this.
This has been fixed in master. Thanks for the report!
Thanks Ryan, appreciate you taking the time to fix this! Downloaded the updated package and can confirm it now works fine
@hafen I can also confirm it now works fine, thank you!
We are trying to run
facet_trelliscope()
and we get an error shown below. We can't quite figure out what to do based on the error. We can get the examples in the help file to run correctly.See the reproducible example below.
Created on 2018-06-27 by the reprex package (v0.2.0).