ggplot(d, aes(x = condition, y = Cxcr4, color = condition))+ +…
Jump to turn (8)
- 1ggplot(d, aes(x = condition, y = Cxcr4, color = condition))+ geompoint(position=
- 2ggplot(d, aes(x = condition, y = Cxcr4, color = condition))+ geompoint(position=
- 3那我应该加入什么参数修改呢
- 4如果我想在图的后面加上网格线做标曲 应该加上什么代码?
- 5这个不对呀,只出现了两条线
- 6你Cxcr4 那行代码能重写一次么?出现了乱码
- 7执行后出现了Error: unexpected input in: " color = "black", size = 12, hjust = 1, vjust
- 8这行代码中哪个是设置字体的
- User
ggplot(d, aes(x = condition, y = Cxcr4, color = condition))+
- geom_point(position=position_jitter(w=0.2,h=0))+
- geom_text_repel(aes(label=rownames(d)))+
- theme_bw()+
- ggtitle("Cxcr4")+
- theme(plot.title=element_text(hjust=0.5)) Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), : Viewport has zero dimension(s) 如何解决
- Assistant
这个错误可能是由于图形尺寸设置不当所造成的。可以尝试使用
ggplot2的ggsave函数来保存图像,并设置图像的尺寸和分辨率,例如:codeggplot(d, aes(x = condition, y = Cxcr4, color = condition))+ geom_point(position=position_jitter(w=0.2,h=0))+ geom_text_repel(aes(label=rownames(d)))+ theme_bw()+ ggtitle("Cxcr4")+ theme(plot.title=element_text(hjust=0.5)) ggsave("my_plot.png", width = 8, height = 6, dpi = 300)