隐藏带有成像仪包装的剧情的X和Y轴

发布于 2025-01-31 19:03:45 字数 707 浏览 2 评论 0 原文

我尝试在下面进行编码,以插入和显示图像在rmarkDown中:

library(imager)
img <- load.image('https://makeshop-multi-images.akamaized.net/figmaster1/shopimages/98/82/1_000000018298.jpg')
plot(img, xaxt = "n", yaxt = "n")

out:

“在此处输入图像说明”

我的问题是如何从图中删除x和y轴?这意味着我希望删除灰色矩形中的内容。

我添加了 xaxt =“ n”,yaxt =“ n” plot(),似乎没有奏效。

参考:

删除绘图轴值

I try to code below to insert and display an image in the presentation file with rmarkdown:

library(imager)
img <- load.image('https://makeshop-multi-images.akamaized.net/figmaster1/shopimages/98/82/1_000000018298.jpg')
plot(img, xaxt = "n", yaxt = "n")

Out:

enter image description here

My question is how could I remove x and y axis from the figure? which means I hope to remove the contents in the grey rectangles.

I've added xaxt = "n", yaxt = "n" inside plot(), it seems not working out.

References:

Remove plot axis values

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风柔一江水 2025-02-07 19:03:45

这是您想要的吗?

plot(img, axes=FALSE) 

Is this what you are looking for?

plot(img, axes=FALSE) 

enter image description here

Check the documentation at https://www.rdocumentation.org/packages/imager/versions/0.42.13/topics/plot.cimg

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文