How to change size from specific geom in ggplot2?

后端 未结 2 2096
执笔经年
执笔经年 2021-01-21 22:46

I have a ggplot containing 2 layers geom_point and geom_line as shown below.

gp <- ggplot(data = mtcars , aes(x = disp , y = hp)) +         


        
2条回答
  •  灰色年华
    2021-01-21 23:06

    You can override specific properties of the plot keeping rest of them as it is

    library(ggplot2)
    gp + geom_point(size = 5)
    

    Or with geom_line

    gp + geom_line(size = 5, color = "red")
    

提交回复
热议问题