如何删除绘图轴与 R 中绘图内容之间的绘图边距? [英] How can I remove plot margins between the axes of the plot and the plot contents in R?

查看:52
本文介绍了如何删除绘图轴与 R 中绘图内容之间的绘图边距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除绘图轴和绘图内容本身之间的空间.有什么想法吗?

I want to remove the space between the axes of the plot and the plot contents themselves. Any ideas?

推荐答案

查看参数xaxsyaxs(?par下).默认情况下,轴包含数据范围加上两侧的 4%.如果覆盖该参数,则可以获得与数据范围完全相等的轴.参考:

Look at the parameters xaxs and yaxs (under ?par). By default the axis contains the data range plus 4% on either side. If you override the parameter, then you can get an axis exactly equal to the data range. Cf:

> curve(x^2)

> curve(x^2, xaxs="i", yaxs="i")

这篇关于如何删除绘图轴与 R 中绘图内容之间的绘图边距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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