控制R散点图中的点的大小? [英] Control the size of points in an R scatterplot?

查看:1976
本文介绍了控制R散点图中的点的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在R中,plot()函数采用一个pch参数,该参数控制图中点的外观.我正在用数以万计的点进行散点图绘制,并且喜欢一个小的但不是太小的点.基本上,我发现pch='.'太小,但是pch=19太胖.中间是否有某种东西或某种方式可以按比例缩小点数?

In R, the plot() function takes a pch argument that controls the appearance of the points in the plot. I'm making scatterplots with tens of thousands of points and prefer a small, but not too small dot. Basically, I find pch='.' to be too small, but pch=19 to be too fat. Is there something in the middle or some way to scale the dots down somehow?

推荐答案

尝试使用cex参数:

?par

  • cex
    一个数值给出 绘图文字的数量和 符号应相对放大 设为默认值.注意一些 图形功能,例如 plot.default有一个这样的参数 乘以该图形的名称 参数,以及一些功能,例如 点接受值向量 被回收.其他用途将 如果向量,则仅取第一个值 长度大于一的是 已提供.
  • cex
    A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. Note that some graphics functions such as plot.default have an argument of this name which multiplies this graphical parameter, and some functions such as points accept a vector of values which are recycled. Other uses will take just the first value if a vector of length greater than one is supplied.

这篇关于控制R散点图中的点的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆