ggplot2 - The unit of size

前端 未结 3 1778
抹茶落季
抹茶落季 2020-11-27 03:51

A quick question that I can\'t find answer on the web (or Wickham\'s book):

What is the unit of the size argument in ggplot2? For example, geom_tex

3条回答
  •  半阙折子戏
    2020-11-27 04:44

    From ?aes_linetype_size_shape

    # Size examples
    # Should be specified with a numerical value (in millimetres),
    # or from a variable source
    

    height and width in ggsave relate to par("din") from ?par

    din
    
      R.O.; the device dimensions, (width, height), in inches. See also dev.size,
      which is updated immediately when an on-screen device windows is re-sized.
    

    So I guess size in aes is in millimetres and ggsave height and width are in inches.

提交回复
热议问题