小编Jam*_*s F的帖子

R | ggplot2 | (删除刻度线+删除面板边框),但保持轴线

这里的新手用户,请客气和温柔!:)

我正在处理以下数据集和R脚本:

#Create pvalue ranges
pvalue <- c(".000 - .005",".005 - .010",".010 - .015",".015 - .020",".020 - .025",".025 - .030",".030 - .035",".035 - .040",".040 - .045",".045 - .050")

#Create frequency counts
count <- c(5000,4000,3100,2540,2390,2260,2150,2075,2050,2025)

dat <- data.frame(pvalue = pvalue, count = count)

#Create plot
myPlot <- ggplot(data=dat, aes(x=pvalue, y=count, group=1)) +
    geom_line() +
    geom_point() +
    geom_vline(xintercept=which(dat$pvalue == '.045 - .050'), linetype = "dashed") +
    theme_bw() +
    theme(axis.text.x = element_text(angle=90),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.background = element_blank()) +
    theme(panel.border …
Run Code Online (Sandbox Code Playgroud)

r ggplot2 border-layout axis-labels yaxis

2
推荐指数
1
解决办法
7128
查看次数

标签 统计

axis-labels ×1

border-layout ×1

ggplot2 ×1

r ×1

yaxis ×1