Flat faces do not translate correctly

I found that with Plotly with R, when I cut, they often do not translate properly from R to Plotly.

For example, my graph built in R looks like this:

enter image description here

When I send it as intended, it looks like this:

enter image description here

(Some data was hidden from both sites for privacy reasons)

My code looks like this:

plot <- ggplot(sytoxG_data_no_NC) + geom_ribbon(data = confidence_intervals_SG, mapping = aes(x = time_elapsed, ymin = phenotype_value.NC.lower, ymax = phenotype_value.NC.upper, fill = "red", colour = NULL), alpha = 0.6) + scale_fill_manual(name = "Legend", values = c('red'), labels = c('Negative Control')) + xlab("Time Elapsed") + ylab("Sytox Green") + ggtitle("Sytox Green - Facets: Pathway") + facet_wrap(~Pathway, ncol=6, scales = "fixed") + theme(panel.grid = element_blank(), axis.ticks.length = unit(0, "cm"), panel.background = element_rect(fill = "white"), strip.text.x = element_text(size=4), axis.text = element_blank()) response <- py$ggplotly(plot, kwargs=list(world_readable=FALSE, filename="SG_sparklines_by_pathway", fileopt="overwrite")) 
+1
source share
2 answers

Perhaps the problem might be with geom_ribbon and not with facets. Can you update your story pack and try again?

0
source

I ended up using facet_grid instead of facet_wrap. Something like that:

 + facet_grid(~Pathway, scales = "free", space="free") 
0
source

Source: https://habr.com/ru/post/1271907/


All Articles