0
votes

I am currently plotting some points onto an existing map of the UK using the following:

points(X$Long, X$Lat, col=X$Col, pch=16,cex=X$Size)

X is the data frame.

The colour of the points varies along with the size.(yellow to orange to red)

I would like the points to be semi transparent so that you can still just about see the lines underneath the points.

What is the easiest way to do this I have already seen some code to alter the colour code but is there an easier way?

Thank you in advance.

2
You should provide a reproducible example. - agstudy
"I have already seen some code to alter the colour code" - that's probably the easiest way, but if you provide exactly what you're doing, maybe some improvements can be suggested. - thelatemail

2 Answers

0
votes

Try the argument":

alpha = I(1/2)

Change the ratio inside the parentheses to change the level of the transparency.

0
votes

You can set the colour transparency within a colour Definition

mycol <- rgb(0, 0, 255, max = 255, alpha = 125, names = "blue50")

as mentioned above the alpha values determines the degree of transparency