ggplot2 plot not rendering in Rj Editor after update to 1.6.

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
SMackinnon
Posts: 12
Joined: Tue Apr 02, 2019 2:18 pm

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by SMackinnon »

So related to the posts above:

a) Related to yoshi's post, I also replicate the problem of not being able to create 2 plots in one instance of RjEditor when using ggplot (making violin plots and density plots). A workaround is running two instances of RjEditor with one plot each. This is again an issue only on Macs, version 1.6.18 of jamovi. No issues on PCs.

b) The problem acshephard is talking about also replicates on my Macbook. For clarity something like this WON'T run, and has an infinite loading icon:

ggplot(data, aes(x = quantity, fill = culture)) +
geom_density() +
facet_grid(culture ~ .)

BUT, this WILL run after taking the legend away:

ggplot(data, aes(x = quantity, fill = culture)) +
geom_dotplot() +
facet_grid(culture ~ .) +
guides(fill = FALSE)
User avatar
jonathon
Posts: 2622
Joined: Fri Jan 27, 2017 10:04 am

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by jonathon »

yeah, this is all on R ... these objects should only be a few kilobytes, but they're ending up being multiple megabytes.

i've raised the size limit of coms to be 4Mb, but these objects are ridiculously huge. a single plot works because it probably weighs in at 3Mb, under the limit. a second plot adds another 3Mb, pushing it over the limit.

there are a few different ways to work around this, but they come with their own set of pros and cons.

jonathon
fball
Posts: 2
Joined: Sun Dec 04, 2022 11:18 pm

Re: ggplot2 plot not rendering in Rj Editor after update to 1.6.

Post by fball »

Is there a fix / workaround for this yet?

EDIT: After experimenting a bit, in an attempt to avoid using "guides(fill = FALSE)", I found that simply adding "facet_grid(.~.)" made the plot appear promptly for me. Hope this can be helpful for somebody.

This, without the last line, will not output the plot in Jamovi 2.23.21
ggplot(tablemelt,aes(x=Cardiopatia,y=value,fill=Aritmie))+
geom_bar(stat="identity", position="dodge")+
scale_fill_brewer(palette = "Paired")+
labs(y="Prevalence", x="Cardiopathy")+
facet_grid(.~.)
Post Reply