Questions tagged [geom-point]
215 questions
0
votes
0 answers
how to specify 2 layers of geom_point
I want to plot the first layer with all the actual data point with circles, and the second layer with mean value using diamonds. I have my fist layer as follows:
ggplot(daphnia, aes(x = parasite, y = growth.rate, color = parasite)) +
geom_point(size…

Ocras
- 3
- 2
0
votes
0 answers
y-axis not in correct order
I am plotting a simple geom_point with year as the x axis and a percentage rate as the y axis. For some reason the y axis is not placing the rate from smallest to largest and instead has the two smallest rates at the top with the rest being in order…
0
votes
1 answer
ggplot not outputting values in dataframe
I have the following dataframe:
Year Ocean O2_Conc
1 2010. Reference 0.000237
2 2010. Pacific 0.000165
3 2010. Southern 0.000165
4 2012. Reference 0.000237
5 2012. Pacific 0.000165
6 2012. Southern …

Ellie Nelson
- 67
- 1
- 7
0
votes
1 answer
Obtain correlation trendlines and R value specific to each y-axis variable in R
I'd like to plot the correlations from variables B, C, D (y-axis) vs A (x-axis), to obtain a plot similar to this:
How can I obtain specific correlation trend lines and R values for each of the variables plotted on a log scaled y-axis?
So far I…

Ecg
- 908
- 1
- 10
- 28
0
votes
1 answer
ggplot2: Dot colors are NOT automatically changed
I am making a figure using the following codes:
d1 <- data.frame(time = c(0,15,60,120),
number = c(0, 5, 5, 10, 0, 20, 20, 25),
arm = c(rep("A",4), rep("B",4)))
ggplot(d1, aes(x = time, y = number, color =…

KLee
- 105
- 1
- 9
0
votes
0 answers
Plot dots over dateline with ggplot in R
I'm trying to plot some dots on a map in R but only half of them show up. I suppose it might have something to do with the dateline.
My sample data:
sites
longitude latitude
1 -136 53
2 140 33
3 -176 59
4 …

Tim
- 13
- 4
0
votes
1 answer
ggplot facet_wrap multiple panels
I work in Genetics and very recently started practicing R, ggplot in particular, to make images for publication.
I run several analyses and combined in a single table (Attempt_mod_TopTen) 3 dataset containing:
y axis (GO_term) = names that have to…

Peps
- 1
- 1
0
votes
1 answer
Plot selected points with different colors, on graphs filled with different shapes
I am currently trying to plot a point graph using ggplot2. The data is of 3 categories, but for each of the categories, there are some selected points I would like to highlight (or make them show differently in the graph). There is no any special…

web
- 105
- 9
0
votes
1 answer
Order variables geom_point based on similar pattern across x-axis in R
How could I order the variables so they are plotted such as a heat map/where they show similar pattern, ie: at the top A and D, then B, C, and bottom E. Would want to avoid doing it manually as real data is many more variables.
Variable1 <-…

Ecg
- 908
- 1
- 10
- 28
0
votes
1 answer
Creating trendline from non numeric data and fixing border on pie chart
I am trying to create a trendline using one column showing months. I would like it to count amount of cases that a product was bought in that month and show dependency between amount of bought products in a specific month. I know I could show it…

Alexiej Stiukov
- 47
- 6
0
votes
1 answer
Create a ggplot with 1 geom_point and 2 geom_line
I want to create a ggplot with 1 geom_point and 2 geom_line (calculated from my variable that is going to be represented on my geom_point)
Here is the script that I though was correct, but I cannnot make the 2 geom_line to appear on my ggplot.…

pat28dh
- 77
- 7
0
votes
1 answer
geom_bar and geom_point conditional colours
I have a simple geom_bar and geom_point and would like to colour bars and points based on values in data. My code is currently as follows:
```df <- (Test3)
ggplot(Test3,aes(ques,diff1,subj))+
geom_bar(stat = "identity")+
geom_point(aes(x=ques,…

adame
- 137
- 7
0
votes
2 answers
Add pie chart in a bar graph
My goal is to create a bar graph of categorical variables and then add a pie chart inside it as shown in the attached image.
my data is the same as in the image and is below:
#For bar grapgh
chromosomes = c("1A", "1B", "1D", "2A", "2B", "2D",…

Mazbi
- 1
0
votes
1 answer
Add a legend to geom_point overlaid on geom_boxplot
So I create a boxplot of data and then add a set point over that data. I want my legend to capture what the data type of the geom_points represents. Thanks!
ggplot(data = NULL) +
geom_boxplot(data = discuss_impact_by_county,
…

Ethan Lobdell
- 31
- 5
0
votes
2 answers
Color legend with geom_text_repel and geom_point
how can be colored the dots next to the legend labels? scale_color_manual or scale_fill_manual do not work. Also how can I change the dots in the legend to squares? Thanks
set.seed(1)
library(ggplot2)
library(ggrepel)
df <-…

user7280624
- 15
- 5