Questions tagged [geom-point]
215 questions
1
vote
1 answer
Control jitter of geom_point with consistent placement in ggplot
I'm making a plot with facet_grid() and use both geom_point() and geom_errorbar() to make something resembling a coefficient plot, but where I have two groups I'm plotting on top of each other.
In order to not make them overlap, I've specified…

a_todd12
- 449
- 2
- 12
1
vote
1 answer
How to increase bounds of a continuous aesthetic in ggplot2
I have 4 sets of data that I am plotting as a scatter plot using ggplot2 in R. Each plot contains an array of points that are both colored and sized according to different variables in the dataset. Each of the 4 sets of data that I would like to…

eyesack
- 13
- 2
1
vote
1 answer
Color and order of coefficients within scale_fill_manual not consistent
As you can see with my code and data below, I am trying to reorder the coefficients by demographic group, so the order is (from top to bottom): Black, Hispanic, White, Female, Male.
What I'm trying to do within scale_fill_manual seems to rearrange…

a_todd12
- 449
- 2
- 12
1
vote
0 answers
ggplot2 geom_point spread ("jitter") points in a square shape
I am trying to plot 2 categorical variables using ggplot2's geom_point geometry. In order to avoid overlapping I found the solution of jittering the points, but that is not really pretty nor easy to comprehend.
I searched some questions here and…

aaa
- 63
- 3
1
vote
0 answers
Adding xlim and ylim to ggmap removes visual layer
I have created a map using get_map and ggmap) that includes points reflecting bird diversity and richness. I want to crop the resulting map to only include certain bounds of latitude and longitude, but when I try to use the xlim() and ylim()…

Christopher Dennison
- 11
- 1
1
vote
2 answers
How can I avoid connecting points of different groups?
Original data as below:
df<-structure(list(AN = c(2017, 2017, 2017, 2017, 2017, 2017, 2018,
2018, 2018, 2018, 2018, 2018, 2018), MOIJOUR = c("6/6", "6/7",
"6/8", "6/9", "6/10", "6/11", "6/1", "6/2", "6/3", "6/4", "6/5",
"6/6", "6/7"), VPD =…

Chouette
- 153
- 7
1
vote
2 answers
Fix continuous color scale for quick visualisation in ggplot2
I need to plot a huge dataset (1 million data) according to two variables. I want :
An equivalent of geom_point to see the distribution of my data
A geom_smooth to see the global trend
My data is very concentrated in some areas of my graphs.…

Dimitri
- 135
- 7
1
vote
2 answers
How to connect geom_point() with geom_line when faceting() is used?
I have an issue and I did not find anything on internet about it. I would be glad to get some hints.
I have a dataset, where the x-axis is discrete, but I would like to connect the points to each other (which I can do). My issue is when I add the…

Robin.N.
- 99
- 8
1
vote
0 answers
Creating space for geom_text() column to right of geom_point() plot AND hiding part of plot
#1
I am creating a coefficient forest plot. I would also like to include two columns to right of the plot, one with a string including the point estimate and CI, and another with the p-value.
I am using ggplot() with geom_point() for the forest plot…

Rolvix Patterson
- 25
- 4
1
vote
2 answers
Fix the order of variables in geom_point plotted on top of geom_col
I have a data table with two categorical variables and one numeric variable.
Here's code to generate the sample data:
data <- data.frame(system = rep(c("X","Y","Z"), 10),
region = rep(letters[1:5], 6),
value =…

ESELIA
- 132
- 1
- 12
1
vote
1 answer
R loop not changing variable
I'm creating a graph with values located in different columns of a data frame. Specifically from columns x=5,7,9,11 and y=6,8,10,12.
Here is a small dataset:
structure(list(number = 1:4, Start = c(2, 2, 2, 2), End = c(42,
42, 48, 48), Seq = c(0.1,…

Juan Pablo Rincon
- 19
- 5
1
vote
1 answer
ggplot doesnt change color by factor
I have a problem occuring in my ggplot that I am unable to find the problem. I have a data frame looking somewhat as follows and whish to plot it color coded by regime:
df <- data.frame(
CO = c(0, 4, 5, 23, 25, 28, 31, 2),
time =…

Jono
- 11
- 2
1
vote
1 answer
How can I set the point size in a ggplot2 scatterplot to match the scale of the axes?
I am trying to make a scatterplot using ggplot2 in which the diameter of the points is of the same dimensions as the variables on the axes and should have the same scale. This problem is laid out well in this question as well as this one, which was…

Eonema
- 203
- 1
- 7
1
vote
1 answer
Add y-axis-values to ggplot?
Say I have a ggplot, with a continuous variable allocated to the y-axis and a geom_point layer. How would I add the y-axis-value corresponding to each point to the ggplot as an additional layer?
EDIT:
For clarification: Next to each point, I'd like…

RibbitRibbit
- 93
- 5
1
vote
1 answer
How do I add color to individual geom points?
Current Code:
ggplot(compare, aes(x=specificity, y=false_positives)) +
geom_jitter(height=.02, color=specificity) +
scale_discrete_manual(values=c("#999999", "#E69F00", "#56B4E9", "violet"))
Error in manual_scale(aesthetics, values, breaks,…

Antonio
- 417
- 2
- 8