有沒有辦法以這種方式在ggplot2中設定軸(用plot()制作)?
先感謝您

uj5u.com熱心網友回復:
目前尚不清楚您在尋找什么方面,所以這里是每個方面的娛樂:
library(ggplot2)
ggplot()
geom_function(fun = function(x) x, color = NA, na.rm = TRUE)
scale_y_continuous(breaks = c(-450, -300, -20, 0, 300, 450),
limits = c(-500, 500), name = NULL, expand = c(0, 0),
labels = c(-450, -300, -20, "", 300, 450))
scale_x_continuous(limits = c(2014.5, 2019.5), expand = c(0, 0),
breaks = 2015:2019, name = NULL)
annotate('segment', x = 2014.5, y = -450, xend = 2014.5, yend = 450, size = 1)
annotate('segment', x = 2015, y = -500, xend = 2019, yend = -500, size = 1)
theme_classic(base_size = 16)
theme(axis.line = element_blank(),
axis.ticks.length = unit(3, 'mm'))

轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/531265.html
標籤:r
下一篇:帶有連接節點的鏈接的聚集氣泡
