Questions tagged [geom-point]

215 questions
2
votes
1 answer

How to adjust both the line and point shape size in a legend to be different sizes?

I'm trying to adjust the point and line size independently in my legend. I'm wanting to be able to discern between the dashed and solid line while also having my point shapes be distinctive enough overtop of the line in the legend. Right now, I…
2
votes
1 answer

How to plot filled points with multicolored borders in ggplot (white black contrast)

I was recently attempting to plot some filled points with an additional white border around the standard black border. I was unable to find a posted solution that did not rely on custom point shapes but still plotted all components of each point…
ikeebrown
  • 56
  • 2
2
votes
1 answer

Is there a way to apply gghighlight on only some geoms in a ggplot?

I'm wondering if there's any way to have gghighlight only apply to geom_point() and geom_errorbar() but not geom_line(). If you look at the plot, gghighlight adds a new line to the graph connecting the two highlighted points, is there a way to stop…
Rhea
  • 31
  • 2
2
votes
1 answer

R selective ggplot geom_point(position = position_dodge())

In the plot below, I'd like to dodge the colored shapes, but not the shape for 1 so that the dotted line would line up with 1. The colored shapes need to be dodged so that they don't overlap one another for being at the same time point. Here's the…
user2272972
  • 131
  • 1
  • 11
2
votes
3 answers

How to make log10 ONLY first y-axis (not secondary y-axis) in ggplot in R

I would like to plot ONLY y-axis1 DATA (left axis, Var1, dotted line) as a log10 scale. The dotted line would therefore look higher on the y-axis and differences between 1 and 2 would be noticeable. I have tried several things, but does not work ( I…
Ecg
  • 908
  • 1
  • 10
  • 28
2
votes
1 answer

R geom_point() number of points reflect value in column

Say I have mydf, a dataframe which is as follows: Name Value Mark 101 Joe 121 Bill 131 How would I go about creating a scatterplot in ggplot that takes the data in the value column (e.g., 101) and makes that number of points on a…
wcbrown
  • 157
  • 7
2
votes
2 answers

How to adjust scale_alpha for geom_point()?

I have produced this Volcano plot: I would like the colored geom_point() to have an increasing alpha, e.g. values at -log(P-value) ~2.3 corresponding to alpha = 0.75 while the maximum values on the -log(P-value)-scale correspond to alpha = 1. This…
cmirian
  • 2,572
  • 3
  • 19
  • 59
2
votes
2 answers

Change colors in a basic geom plots

everyone, i was trying to change color for the next plot : i have tried other solutions as: my_pal <- colorRampPalette(c("yellow","firebrick2")) scale_color_gradientn(colours = my_pal(6)) or adding color = ... in geom_point , but something is…
2
votes
1 answer

How to differentiate groups in a geom_point plot via point types

I have a dataframe which has two different sample types (A and B). I would like to differentiate these by using different shape options. Here is a dataframe and my current attempt at performing this. output of…
Krutik
  • 461
  • 4
  • 13
2
votes
1 answer

How to set different fill colour for scale guide in geom_jitter?

I want to create a plot where the geom_points (or jitters) are filled after a given value, but their line color is white. However, setting colour to white makes it so the legend shows invisible points, and is rather useless. How can I force the…
helge
  • 23
  • 5
2
votes
1 answer

Can you combine a geom_bar pie over a geom_point plot in R?

Is there a way to plot geom_pie over a geom_point plot? with a shared Variable (here: Location) I have seen people do pies over maps plotting pie graphs on map in ggplot But I was wondering if there is some package or function which allows you to do…
Ecg
  • 908
  • 1
  • 10
  • 28
2
votes
1 answer

geom_bar grouped data with geom_point color based on values

I would like to add geom_point showing value of sect to my grouped geom_bar showing value of perc with point colour based on conditional data My data is like this: ```structure(list(year = c(2019, 2019, 2019, 2018, 2018, 2018, 2017, 2017, 2017,…
adame
  • 137
  • 7
2
votes
0 answers

Plotting points on top of worldmap in R, error: Discrete value supplied to continuous scale

I'm trying to create a figure in R that has a base worldmap with locations overlaid on top as points. I'd also like to specify the size and color of the points with additional data from my dataframe. Here is my code as it stands: #reading in…
2
votes
1 answer

What makes a dot plot on top of another on geom_point? And how to change it?

What makes a value-dot plot overlap and plot on top of another on the ggtern plot? And how can I change it? I would like to have my selected coloured observations plotted on top of the black ones. (On my data I have 1400 observations and even with…
Ecg
  • 908
  • 1
  • 10
  • 28
2
votes
1 answer

Fill by geom_point and black outline in a ggtern

How can I color A and D with a selected fill red/blue and the black outline. Check my to see what I have tried. Thanks! obs <- c("Gene1", "Gene2", "Gene3", "Gene4","Gene5", "Gene6") func1 <- c("A", "B", "C", "D", "C", "A") func2…
Ecg
  • 908
  • 1
  • 10
  • 28
1
2
3
14 15