Questions tagged [geom-point]
215 questions
0
votes
1 answer
ggplot2 - filling in manual shapes with manual colors
I would like to create a scatterplot such that
geom_point has different shapes, all shapes are outlined in the same color, but each distinct shape is filled with it's own color.
Per the example below, I want all of the points to be outlined in blue.…

hhillman231
- 125
- 1
- 2
- 9
0
votes
1 answer
how to apply aes(size=...) to some sets of data (point) range, for each range seperatly in ggplot2
I have some range of data which I used aes(color=data_range). Now I want to change size in each range when I plot. when I use aes(size=...), all data in all ranges change by size. but how to change size for each specific range? I mean, in each range…

Ali Abd
- 11
- 3
0
votes
1 answer
ggplot2 geom_point position= "dodges" doesn't match the error bar dodge
Im trying to figure out the best way to plot changes in water potential through summer comparing two factors, soil cover treatments and irrigation. I reached a fair result but im having troubles that the geom_points doesn't follow the position_dodge…

ocrovo
- 1
0
votes
1 answer
How to manually change the color of certain geom_point?
I'm fairly new to R and am wondering how can I manually change certain geom_point's color?
For instance, here's the average velocity of Justin Verlander from 2008 - 2022
JVvelo_year%>%
ggplot(aes(factor(year), velo, group =…

Kai
- 1
0
votes
0 answers
Add geom_point() to cowplot subplot
I have made a cowplot using
gg <- cowplot::plot_grid(p1, p2)
I now want to add a ggplot2::geom_point() layer to p1 but I only have access to gg. How can I pull p1 and p2 back out, add a layer to p1 and then make a new cowplot,…

jtd
- 179
- 7
0
votes
1 answer
Adding connection lines in ggplot geom_point by order of appearance
I have data that looks like this:
phase_f share
1: Conceptualization 0.5000000
2: Growth 0.6666667
3: Idea 0.2777778
4: Incubation 0.8333333
and I want to plot that data that takes a point for the…

Odysseus
- 25
- 3
0
votes
2 answers
Generate a legend and connecting data points (ggplot2)
I am pretty new to R. I've been trying (for the entire day) to plot data points on one graph and generate a legend for it.
I have a raw data set about people's political ideology (factor, 1=liberal, 2=conservative, 3=neutral), firm choice (liberal…
0
votes
1 answer
R studio ggplot2 geom_point X axis not showing points properly
ggplot(DelaysTimeofDayTotal, aes(CRSDepTime)) + geom_point(aes(y = DepDelay, color = "DepDelay"))
+ geom_point(aes(y=ArrDelay, color = "ArrDelay"))
+ scale_x_discrete(limits=(day.name))
+ labs(x= "Time of Day", y = "Delays in minutes")
+…

jerry
- 21
- 4
0
votes
1 answer
Add color to the points in geom_point
df1 <-data.frame(Mean = as.numeric(c("45.71329", "38.162915")), Std = as.numeric(c("7.366905257", "9.597423074")), Samples=c("C", "T"))
df2 <- data.frame(Samples=c("C","C","C","C", "T", "T","T","T"), Values=c(38.37464, 40.84156, 49.50789,54.12907,…

marduk
- 37
- 5
0
votes
1 answer
How do you add a color criteria to a scatterplot in ggplot2?
I am creating a scatterplot to show the relationship between Very Active Minutes of exercise and Calories burned. In my scatterplot I want the points to be green after 30 minutes of activity. Below is the code I am currently using, but I do not know…
0
votes
1 answer
When should we add aes() ? The first code is giving error while the other isn't
Code giving error:
ggplot(mtcars, aes(wt, mpg)) + geom_point(aes(shape = 1, size = 4))
Code Not giving error:
ggplot(mtcars, aes(wt, mpg)) + geom_point(shape = 1, size = 4)

Devesh
- 1
0
votes
1 answer
adding average line group by column in r
hi i have data that looks like this :
38 columns total . 10 types of treatments in treatment column and dates from 25-29 in date column data sample code ( example for 2 treatment types but the data has 10 types ):
df <- structure(
list(
…

Eliza R
- 125
- 1
- 10
0
votes
1 answer
Overlay geom_points(aes(shape)) on geom_boxplot?
I am just trying to plot a ggplot figure of overlaying a points plot on a boxplot. I got very strange result and hope someone can tell me why and how to fix it. Overlay geom_points() on geom_boxplot(fill=group)? here is a similar question. But the…

Shixiang Wang
- 2,147
- 2
- 24
- 33
0
votes
1 answer
manually scale color of a factor in ggplot
Let's say i have a data frame like this
id password year length Something
1 1234567 2001 7 good
2 pass4 2001 5 bad
3 angel3 2003 6 bad
4 pizza 2004 5 ok
im trying to…

Em Manuel
- 93
- 6
0
votes
1 answer
geom_point with shape, fill and color
I have created a ggplot of points that show the mean and sd of the variable "y-axis" in each level of x_axis, and have different shapes according to cat.1 and different colors according to cat.2. There are 3 panels according to "time"
the dataframe…

Marta Román
- 9
- 3