Skip to content
Back to formatted view

Raw Message

Message-ID: <91b886ad-4759-7743-c097-3b41da4113c7@sapo.pt>
Date: 2020-09-30T18:06:28Z
From: Rui Barradas
Subject: How to decrease size of points?
In-Reply-To: <CAH6117JZieBDvB2VDCrrAQJ7WzCR=0yr2a5BFoHZhfz8HH1obA@mail.gmail.com>

Hello,

That's the problem of not having a reproducible example, you only gave 
us one value for size.
Try

nsize <- length(unique(df1$Stage))

before the plot and then

p1 + scale_size_manual(values = rep(0.8, nsize))


Hope this helps,

Rui Barradas


?s 17:58 de 30/09/20, Medic escreveu:
> The code works as I want, but the points (circles) on the plot are too
> big. How to decrease them? Where to insert (for instance) size = 0.8
> for points (circles) on plot?
> p1 <- p + geom_point(aes(size = Stage), alpha = 1/3) + xlab ("X") +
> ylab("Y") + geom_smooth()
> Stage is factor, x and y - continuous
> 
> <Rui Barradas: add the scale_size
> p1 + scale_size_manual(values = 0.8)>
> 
> Thanks Rui, but I got:
> Error: Insufficient values in manual scale. 12 needed but only 1 provided.
> (or Error: Continuous value supplied to discrete scale)
>