Questions tagged [geom-point]
215 questions
0
votes
1 answer
Making a plot relative to a reference group in R
First, here's the context. I have data from multiple samples that were all analysed with 3 intruments for the same measurements. One of the instrument is the reference one and we want to plot (and analyse) the measurements from the other instruments…

Carl S
- 1
- 1
0
votes
1 answer
How to arrange multiple plots together in a for loop
filtered_el
Site Sample Ca P Si Mg Sr Fe K Al
1 Cave s13 233483.7 6653.86 85458.49 6822.14 236.12 25002.51 9914.30 16847.06
2 Cave s16 332549.4 24779.57 53839.66 6446.35…

Valentina
- 47
- 4
0
votes
1 answer
How to make the points in a geom_point scatter plot depend on the count?
I'm using ggplot to create a scatterplot of a dataframe. The x and y axis are two columns in the frame, and the following code gives me a scatter plot:
ggplot(df,aes(x=Season,y=type))+
geom_point(fill="blue")
But the points are all the same size.…

Johnny
- 59
- 5
0
votes
0 answers
How to map same colours to points and boxplots
I am trying to make a boxplot graph with data points in R but cannot match the colours of the boxplot and the points. Here is my code:
ggplot(Data_expo, aes(x = Group, y = LogConcentration, fill = Planttype))+
geom_boxplot(outlier.shape=NA) +
…

mervet
- 11
- 1
0
votes
1 answer
ggplot countour plot: add secondary dataset (point data) using secondary axis
I have read a number of other similar questions on this platform and am very close to solving this issue, but still cannot get the code correct.
I have a contour plot with a reverse y axis. I would like to plot data from a second data set, over the…

Ellen
- 130
- 3
- 12
0
votes
1 answer
How to plot coordinates over a shape file in R?
a little new to this so any help would be greatly appreciated. I've loaded a shapefile of all the countries in the world and plotted it. However, I'm having trouble adding a bunch of points from coordinates to the plot. Any help in how to fix this…

Chase Dickson
- 15
- 4
0
votes
0 answers
How to plot two different line plots using geom_line and, especially, geom_area
I'm asking for your advice and support to plot two lines of data using the geom_line and geom_area f(x) in Rstudio. It's pretty simple, but I can't fix the bugs from the final plot. I will appreciate your help!
The code that I'm using is described…

Cesar Barrientos
- 19
- 3
0
votes
0 answers
How to add lines between lowest and highest points for each date (ggplot)?
I am trying to create lines in my ggplot from lowest value to highest value on each date. I don't want any lines between each date (so adding geom_line does not work).
I have a dataset with dates from February 22nd to March 11th with abnormal…
0
votes
1 answer
Scatterplot with x-axis and y-axis values dependent on column values, each axis measures same variable
I have a tibble df that looks like this:
id sex rating
1 43 male 10
2 44 female 8
3 45 male 7
4 46 male 3
5 47 female 5
How would I go…

KLG
- 173
- 1
- 12
0
votes
1 answer
geom_point not showing up on ggplot with geom_sf of rivers
I am trying to build a map that contains a few points overlayed onto rivers. I am using code adapted from https://milospopovic.net/map-rivers-with-sf-and-ggplot2-in-r/, but I downloaded the North America map and substituted
st_polygon(list(cbind(
…

jstalker
- 3
- 2
0
votes
1 answer
Geom_plot change color of points based on x axis text
I have a data like below and I want to create a plot for every column vs the very first column like in the code. However, how is it possible to give different colours to points based on row numbers or x axis test? For example all geom_points of…

user3224522
- 1,119
- 8
- 19
0
votes
1 answer
How to remove excess lines in ggplot
I'm looking at growth
My dataset (of averages) looks like this - values are growth rates
However for some reason when I add the geom_plot function I get extra lines (see photo below)
Just wondering if anyone knows why this may be and how I could…

timeywimey
- 41
- 6
0
votes
0 answers
Scatter plot with two variables and different size points
I'm trying to create a scatter plot from a dataset that consists of NO3 measurements done in the field (F) and in the lab (G). I have successfully created the plot however I would like for the lab sample point in the graph to be slightly larger than…

MGB
- 5
- 2
0
votes
0 answers
How to return output as NULL object in ifelse condition when the condition is FALSE
I am worried if someone can help me for getting output from ifelse() function in R. I am using mtcars dataset. I wants if condition is TRUE then the command should return a data frame and if condition is FALSE then the command should return a NULL…

Farhan
- 57
- 5
0
votes
1 answer
R: ggplot: two plots in one dataframe: color one plot only when it is less than the other plot
I have two geom_point plots from a single dataframe on a plot. What I want is to only color label when plot 2 is below plot 1 on the y axis. So if it is above, plot2 would be grey/black, when it is below, it will be labeled by a certain column in…

ambergris
- 17
- 4