Questions tagged [geom-point]
215 questions
0
votes
2 answers
ggplot: define color for point overlaps
With ggplot2 I want to plot two vectors (vec1_num, vec2_num) in two dimensions and colour the points by a group variable (vec3_char). Some data points are overlapping.
library(ggplot2)
vec1_num = c(1,2,3,4,1,3,4,5,5,5)
vec2_num =…

AennaPhD
- 147
- 8
0
votes
1 answer
ggplot2 geom_point with aes fill only displays black
I'm having trouble displaying different fill colors with geom_point, only black shows up. I know I can use color to show different colors but it doesn't seem to work well with geom_segment. Here is an example what I'm getting, where the points are…

user2272972
- 131
- 1
- 11
0
votes
1 answer
R - adding dots to a UK Local Authority choropleth map ggplot
I've made a Choropleth map in R which shades local authorities based on the percentage of households who are in Fuel Poverty.
#converts file into a readable format
options(scipen = 999)
#create a data frame from imported CSV file
mydata <-…

Rachel
- 3
- 1
0
votes
1 answer
Issue adding second variable to scatter plot in R
Been set this question for an assignment - but i've never used R before - any help is appreciated.
Many thanks.
Question:
Produce a scatter plot to compare CO2 emissions from Brazil and Argentina between 1950 and 2019....
I can get it for Brazil but…

LF123
- 23
- 3
0
votes
1 answer
ggplot2: using geom_point() and not all of my character labels are plotting on the X-axis
I am trying to graph using the ggplot2 geom_point call in R. However, when I plot the desired graph, my X-labels that are words (not numbers) do not all show up on the X-axis.
To begin, here is some reproducible data:
Bac <- data.frame(logFC =…

Purrsia
- 712
- 5
- 18
0
votes
1 answer
R ggplot2 problems with fill and color
I have 2 data frames
DF1
NMDS1 NMDS2 NMDS3 id.type Cruzier Station Deep
1 -0.6408266 -0.60298057 0.22242583 Samples X6 G44 MAX
2 -0.6207177 -0.53097033 0.16097249 Samples X6 B12 MAX
5 -0.6000443 0.01716781 …

abraham
- 661
- 8
- 14
0
votes
2 answers
Rearranging order of X axis causes errorbars to no longer match up on y axis
I wanted to order my y axis values and in doing so my errorbars no longer fit on the y axis. The code is below if i run just ggplot down I get error bars in the right place, if I run it all removing the Kale_Nutrients from the ggplot the error bars…

Charlotte Tutton
- 3
- 2
0
votes
0 answers
Plotting with geom_point (ggplot2) with R
I'm relatively new to R, so any imput would be greatly appreciated. The code I'm writing is about graphing certain spanich cedar populations across America. I was able to export a map using ggmap, and although the map can be visualized, the function…

Ana
- 1
- 1
0
votes
1 answer
Add labels to classification points boundaries in R
I am working on a project in which I have to put labels on my chart for the boundaries(encircles) around some scatter points.[![enter image description here][2]][2]
As it is shown in the picture, I want to put GrainSize labels on the three encircled…

Rahul Kumar
- 39
- 1
- 11
0
votes
1 answer
How to customized ggplot2 geom_point plot according to the another variable?
I am trying to customized the geom_point plot and I've attached my dataset example below.
# Example of the data
library(ggplot2)
coverage = data.frame("category" = c("A","A","B","B","C","C"), "position" = c(1,4,1,3,2,3), "width" =…
0
votes
1 answer
Changing specific value color with ggplot
I am using geom_point() with ggplot to essentially create the equivalent of a -coefplot- with coefficients of 5 different models on one plot.
Is it possible for me to change the color of just one point (and corresponding CI bars)? What about the…

a_todd12
- 449
- 2
- 12
0
votes
1 answer
How to highlight a single point, which is a row, of a ggplot?
I need to highlight a single point of a geom_point graph from ggplot. Since it is an extensive dataset, I have sliced the rows that I needed to analyze with the following code, which gave me:
jpp1 <- my_data %>% slice(52:51)
The output:
Date …

zork1
- 69
- 5
0
votes
1 answer
ggplot combine geom_text_repel with facet_zoom
I have the following code sample:
x <- c(1,1.2,1.3,1.1,2,2.5,3.6)
y <- c(3,3.1,2.9,3.6,4.5,5.6,6.7)
z <- c('Austria',' Germany', 'Italy', 'France', 'Spain','Portugal', 'Belgium')
dataset <-data.frame(x,y,z)
ggp <- ggplot(dataset, mapping =…

unter_983
- 167
- 6
0
votes
1 answer
Why is my x-axis getting cut off before the end of my data, when I tried adding xlim() I got an error?
I am trying to make a scatterplot with salinity on the y-axis and Date/Time on x-axis. However, when I try to plot it my x-axis data is getting cut off before the end of my data. I've tried adding an xlim but I get an error. See below
p_OY1 <-…

Ashley McDonald
- 1
- 1
0
votes
0 answers
ggplot: geom_point shape larger than pch in base r
I'm creating Bland Altman plots using the blandr and ggplot packages, I was previously using the BlandAltmanLeg package but switched due to difficulties in customing the axes in this package.
My issue is that after switching, setting the plot marker…

SasCom
- 47
- 1
- 7