ggplot2的传奇消失在ggplotly中

时间:2019-03-20 09:27:47

标签: r ggplot2 ggplotly

我试图在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中运行时,我注意到尺寸的图例已经消失。

有人可以帮忙吗?谢谢!

0 个答案:

没有答案