R图-在一点画一个大圆

发布于 2024-12-01 02:52:39 字数 166 浏览 2 评论 0原文

我怎样才能提出一个大的、没有彩色圆圈的点?

x0 和 y0 只是具有 1 值的列表。

所以这只是绘制一个值:

points(x=x0,y=y0,col="green",pch=16)

但是圆圈有点小,并且它是彩色的。

How can I make a point that is a big, NOT colored in circle?

x0 and y0 are just lists with 1 value.

So this just plots one value:

points(x=x0,y=y0,col="green",pch=16)

But the circle is sort of small, and it's colored in.

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

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

发布评论

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

评论(3

所有深爱都是秘密 2024-12-08 02:52:39

要使单个绘图字符更大,请使用 cex,如下所示:

points(x = x0, y = y0, col = "green", pch = 16, cex = 10)

请阅读(尽管有点乏味)?par 了解基本图形选项。

编辑

我想我应该添加(尽管我同意这个问题大部分是重复的),你的问题的第二部分只需要一个不同的pch值。听起来 pch = 1 就是您想要的,但您可以通过 example("points") 看到很多选项。

To make the single plotting character larger, use cex, as in:

points(x = x0, y = y0, col = "green", pch = 16, cex = 10)

Please read (even though it's kind of tedious) ?par for base graphics options.

EDIT

I suppose I should add (even though I agree this question is mostly a duplicate) that the second part of your question simply requires a different value for pch. Sounds like pch = 1 is what you want, but you can see lots of options via example("points").

盗心人 2024-12-08 02:52:39

根据您想要的圆圈大小,您还可以考虑使用 symbols() 函数。

## from ?symbols
N <- nrow(trees)
with(trees, {
## Girth is diameter in inches
symbols(Height, Volume, circles = Girth/24, inches = FALSE,
        main = "Trees' Girth") # xlab and ylab automatically
})

显示符号使用的图()

Depending how big you the circles you want, you could also consider the symbols() function.

## from ?symbols
N <- nrow(trees)
with(trees, {
## Girth is diameter in inches
symbols(Height, Volume, circles = Girth/24, inches = FALSE,
        main = "Trees' Girth") # xlab and ylab automatically
})

plot showing use of symbols()

李不 2024-12-08 02:52:39

包 shape 包含用于绘制各种图形形状的函数集合(请参阅 vignette("shape") )。在您的情况下:

install.packages("shape")
require("shape")
emptyplot(c(0, 1))
plotcircle(mid = c(0.5, 0.5), r = 0.25)

在此处输入图像描述

The package shape contains a collection of functions for plotting all kind of graphical shapes ( see vignette("shape") ). In your case:

install.packages("shape")
require("shape")
emptyplot(c(0, 1))
plotcircle(mid = c(0.5, 0.5), r = 0.25)

enter image description here

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