Questions tagged [geom-point]

215 questions
1
vote
0 answers

scale_shape_manual() does not work in my code

I came up with a plot using ggplot. I am trying to manually change the shape of my points with scale_shape_manual but it does not work really. A header of the data I am using: visit DF UPDRS_type score
lexmc
  • 11
  • 2
1
vote
1 answer

plotting multiple columns in R using geom_point

i have a data frame that looks like this : total-36 columns. data sample code : df <- structure( list( Bacteroidaceae = c( 0, 0.10944999, 0.104713314, 0.125727668, 0.124136247, …
Eliza R
  • 125
  • 1
  • 10
1
vote
1 answer

Assign points to a specific range on x-axis

I generated this graph with ggplot2, (I manually added red rectangle) I want to somehow "label" the x - axis intervals. For example; from 1.45e+08. to 1.46e+08 is named as "low" , 1.46e+08. to 1.47e+08 as "mid" and I only want tho show this lables…
juylmin
  • 47
  • 7
1
vote
1 answer

ggplot only black dots and no colors

I have a dataframe in R as this (only sample posted here): DE logFC pval log2fc_color rank 1 Upregulated 3.4958900 264.1088 #00519e 110 2 Upregulated 2.9649858 254.4343 #00519e 222 3 Upregulated …
biobudhan
  • 289
  • 1
  • 2
  • 11
1
vote
0 answers

How can I prevent geom_point points from overlapping labels in R?

I am making a PCA plot using autoplot, and I wanted to enlarge the point size. I used geom_point() for this purpose, however, this makes the larger points layer on top of (and cover) the text of my variables. How can I solve this? This is my…
Aashi
  • 11
  • 2
1
vote
0 answers

Stop Geom-Point from Re-ordering Y axis in R

I am trying to plot points on top of existing lines in ggplot. If I plot just the lines, the y axis is in the order that I'd like it to be in. However, when I try to add the points, the y axis order changes and I can't figure out why. Here's the…
1
vote
0 answers

Align asterisk of geom point ggplot with position dodge

I am trying to align significance asterisks (* or ** or ***) to the points of a geom point graph with position dodge to indicate the significance of a value using ggplot2. I wasn't able to find any similar questions and answers with similar…
Simona
  • 87
  • 2
  • 8
1
vote
2 answers

ggplot, conditional fill geom_point

I am looking for a way to fill geom_point if it meets a condition Example: mydata <- tibble(x_var = 1:5, y_var = runif(5), category_a = c('yes', 'yes', 'no', 'no', 'yes'), category_b = c('down',…
1
vote
2 answers

Show corresponding legend for second geom_point()

I am plotting three times with geom_point in the same plot but the second and third geom_point don't appear in the legend and I don't understand why. I looked at many posts but I can't find a solution that really works. My 2 original dataframes are…
Jude
  • 153
  • 2
  • 8
1
vote
0 answers

When I use aes(shape) in geom_jitter, the individual points no longer line up with their respective groups in an overlayed geom_col graph

I am trying to visualize a change in serum concentration of a certain protein over a time-period of 6 days. I am able to very easily obtain the bar graph I would like, however, the journal I am trying to publish in requires individual data points…
Afausey
  • 11
  • 2
1
vote
1 answer

ggplot Map shifts when adding geom_point

I am trying to create a map using ggplot and layering in my lat/lon points. I created the map of the US without issue but when I layer in my geom_point lat/lon positions the map of the US shrinks and changes. Can someone please point me to why this…
ZHX
  • 67
  • 5
1
vote
2 answers

ggplotly() ignores legend and produce different plot with ggplot legend

I try to use ggplotly to run ggplot graph, but the legend label not showing the same things. Why it is? Please help. Thanks And also any idea to ignore the warning of changing to numeric data, so it doesnt show too many warning when run it through…
mjberlin15
  • 147
  • 1
  • 10
1
vote
2 answers

Point size in geom_point when using fill

I want to use ggplot to show points and lines, but I want there to be two legends - one for the points and one for the lines. I managed to do this using the below code, but for some reason the 'size' option no longer responds in geom_point and they…
Roger Hill
  • 13
  • 2
1
vote
1 answer

Add error bars to multiple geom_point variables given sd values

I'd like to plot my error bars based on my SD values from each of my variables. I have tried few things (see bottom) but I believe there is a way to plot individual sd for each data point for each variable? Location = c(1,2,3,4,5,6,7) A = c(1.23,…
Ecg
  • 908
  • 1
  • 10
  • 28
1
vote
1 answer

How to remove stroke from smallest points with geom_count?

I'm trying to use geom_count() to size points on a ggplot by their occurrence frequency, but for some reason the smallest points end up having black strokes. I've tried different shapes, stroke = 0, everything, but I can't figure this out. I'd…
ThatCrazyCow
  • 469
  • 2
  • 5
  • 17