控制R散点图中的点的大小?

编程入门 行业动态 更新时间:2024-10-17 23:25:01
本文介绍了控制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散点图中的点的大小?

本文发布于:2023-07-19 08:47:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1154852.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图中   大小

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!