重置R中的绘图设置

时间:2017-10-24 18:10:24

标签: r plot ggplot2

我有一些问题只是绘制标准ggplots,可能是因为一些设置已经改变,我不知道。例如:

a0 <- 10; b0 <- 3
ph <- function(phi){return(1/2*dbeta((phi + 1)/2,a0,b0))}
phi_plot <- ggplot(data = data.frame(phi = c(0.5,1)),aes(phi)) + 
stat_function(fun = ph,n = 500) + xlim(c(0.3,1)) + 
  ggtitle(expression(paste("Prior distribution ", phi))) + 
  xlab(expression(phi)) + 
  ylab("Prior")  + theme(plot.title = element_text(hjust = 0.5))
phi_plot

产生这个情节: enter image description here

我不知道为什么背景是白色的,轴会消失。有人知道如何将设置重置为默认值吗?

0 个答案:

没有答案