Questions tagged [geom-point]
215 questions
0
votes
1 answer
R Geom Point - Data disappearing after Color Palette
I have this geom point, that shows the Sales Ratio of 30 towns from Connecticut, works well and this is the chart.
Once I add a color palette (last line of code), it removes 22 data rows.
*Removes 21 rows containing missing values ( geom_point() )…

Humberto Hernandez
- 21
- 5
0
votes
1 answer
Using stat_summary() to create a path between data points but they're connecting in the wrong order
I’m using ggplot to make a geom_point() graph, and I’m using stat_summary() to show mean values for each category and an interconnecting line. I’ve had to reorganise the categories on the x-axis using scale_x_discrete(), but the line between the…

Haydn Farrelly
- 3
- 1
0
votes
0 answers
geom_point dodge spreading unevenly
I am trying to plot antibody levels, GMT (Y axis) at four different time points (X axis) for a group of 55 individuals using geom_point, linking each person's data with geom_lines so I can see the trends over time (I don't have data for all time…
0
votes
1 answer
ggplot scatter plot points not responding to colour arguments
I have made a loop to create a list of scatter plots of difference (y axis) vs sample (x axis). For these plots, outliers are defined as samples where difference between two counts for the same sample was larger than 10%. I have coloured outliers in…

Juju
- 1
0
votes
0 answers
Geom_point + geom_line colour choice
I am building a graph with ggplot2, but I wan a specific set of data to be black. However, by default R gives them another colour, and when I force it to be black, then it disappear from the legend:
Plot with colours chosen by R
ggplot(binodalbetla,…

David Moldes
- 25
- 4
0
votes
1 answer
How to line up geom_points on grouped boxplots
I am trying to plot data that is grouped by one variable into boxplots using ggplot2, then I want to distinguish each data point plotted by their replicate using different symbols.
My data:
Cell_line<- rep(c("B1", "B2","C"), each=4)
Condition<-…

Ema
- 3
- 1
0
votes
1 answer
Sort geom_point in ascending order along one particular facet
Given the data below, I'm making a simple coefficient plot. I know I could supply a custom order and custom labels to manually rearrange 'var' using scale_y_continuous(), but surely there must be a way to reorder a continuous variable (coef, in my…

a_todd12
- 449
- 2
- 12
0
votes
1 answer
Trying to understanding a geom_smooth error
Can someone please help me understand why the first line of code works, but not the second? I'm relatively new to R and would appreciate any help I can get!
ggplot(penguins, aes(x = flipper_length_mm, y = body_mass_g)) + geom_point() +…

Meetch
- 3
- 1
0
votes
1 answer
How to plot two curves from data in two different dataframes on the same graph with ggplot?
I'm very new to R and I have to deal with quite big datasets from a previous work. During these previous studies, the person worked on excel and I have to adapt everything on R.
Especially, I did 2 simple linear regressions. To simplify, the first…

Tori
- 1
0
votes
1 answer
ggplot geom_point make the points bigger when using aes
In ggplot I want to make the geom_points bigger overall when they are in an aes. For example:
ggplot(diamonds %>% head(30)) +
geom_point(aes(x = cut, y=color, size=carat))
Gives exactly the same plot as
ggplot(diamonds %>% head(30)) +
…

pluke
- 3,832
- 5
- 45
- 68
0
votes
1 answer
Geom_point and geom_line on same line within facet in ggplot
I am back trying to build on a figure I asked about here yesterday. Instead of a bar plot, however, I'm trying to see if I can use geom_point() to get the "Skipped" and "Attended" values together on one line within each facet, similar to the picture…

a_todd12
- 449
- 2
- 12
0
votes
1 answer
geom_smooth does not connect through breaks in some of facet_wraps
Let's say I have
'data.frame': 75 obs. of 4 variables:
$ study : chr "Dux" "Steele" "Ness" "Dux" ...
$ celltype : chr "Lymph" "Granulo" "Lymph" "Lymph" ...
$ value : int NA NA 86 NA NA NA NA NA 76 100 ...
$ time.numeric: num…

cmirian
- 2,572
- 3
- 19
- 59
0
votes
2 answers
Remove legend background for geom_point in combined ggplot
I want the legend to only show the black point for Proporció sobre la despesa total, without the purple background.
Here a sample of my dataset:
structure(list(decils_renda = structure(1:10, .Label = c("1r",
"2n", "3r", "4t", "5è", "6è", "7è",…

Maria
- 173
- 7
0
votes
1 answer
Order in bar graph with ggplot changes after adding points
I'm trying to create a bar graph with ggplot including an error bar and points.
So far I got everything I wanted but the order of my bars.
This is my…

Viridian468
- 11
- 3
0
votes
1 answer
Colouring specific points on a scatterplot with ggplot2
I have been scratching my head at this for ages and I cannot figure out for the life of me what I'm doing wrong.
I'm aware this is very similar to a few other question, most notably: How to plot specific colors and shapes for ggplot2 scatter plot?…

Sabor117
- 111
- 1
- 11