Я попытался построить что-то в ggplot2, и прикрепил скрипт:
a <- ggplot(seq_info, aes(x = Sample, y = Total_bp, size = No_of_genomes)) +
geom_point() +
# White background with no gridlines
facet_wrap(.~Quality, ncol = 2) +
scale_y_continuous(labels= function(x) format(x, scientific = T)) +
labs(title = "Total sequencing length produced by Illumina Hi-Seq 2500",
# Add a line break before the axis title increase distance between text and title on axis
x = "\nSample", y ="Total basepairs\n") +
theme(text = element_text(size = 18),
plot.title = element_text(size = 18, face = "bold", hjust = 0.5),
axis.title = element_text(size = 16,face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1, color = "black"),
axis.text.y = element_text(color = "black"),
panel.background = element_rect(fill = "grey90"),
panel.grid.major = element_line(size = 0.5, linetype = 'solid', colour = "white"),
# facet title
strip.text.x = element_text(size = 16, colour = "Black", face = "bold"))
ggplotly(a)
Однако я заметил, что легенда о размере исчезла при попытке запустить его в ggplotly.
Может кто-нибудь помочь?Спасибо!