3

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.

1

3 Answers 3

6

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").

Sign up to request clarification or add additional context in comments.

Comments

6

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()

Comments

3

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.