Questions tagged [ggrepel]

ggrepel: Repulsive Text and Label Geoms for 'ggplot2' Provides text and label geoms for 'ggplot2' that help to avoid overlapping text labels. Labels repel away from each other and away from the data points.

Repulsive Text and Label Geoms for

Description

Provides text and label geoms for 'ggplot2' that help to avoid overlapping text labels. Labels repel away from each other and away from the data points.

Repositories

206 questions
0
votes
1 answer

ggplot2 scale_shape_manual legend does not display

Here's a toy example with minimal data. ggrepel is necessary because my actual dataset contains proximate point pairs. ggthemes is not necessary but included to get a cleaner map. The Id numbers and letters in the example are arbitrary, a byproduct…
syre
  • 902
  • 1
  • 7
  • 19
0
votes
1 answer

How can I fix my overlapping labels when ggrepel isn't working?

I am working on a project and trying to make some graphics. I am pretty new to coding, so any help would be much appreciated. I created a graph, but the labels at the bottom are overlapping, so I tried adding in geom_text_repel() and…
0
votes
1 answer

ggrepel change the segments

Trying to add labels to my points with jitter point. I defined the position using pos and use geom_label with pos instead off jitter. That works well but the point of doing that was then to add labels to some of my points. I use geom_text_repel…
user236152
  • 248
  • 1
  • 2
  • 10
0
votes
1 answer

Aligning ggrepel labels

I have a script that downloads a bunch of COVID data about the area surrounding some Air Force bases and produces a chart. I was going to try to reproduce it using a big dput() but it's too many characters for a post. The dput() to reproduce the…
jerH
  • 1,085
  • 1
  • 12
  • 30
0
votes
2 answers

Labels in R plot being overwritten by geom_line()

I am using ggplot and geom_line to plot a graph in R, but I see that the labels are being over-written by the plot. Is there any way I can address this issue and have the labels be visible clearly? Also, I would like to have the words "Gross sales"…
user17144
  • 428
  • 3
  • 18
0
votes
2 answers

text labels are not showing on plot using geom_text_repel

I am making plot in attach using this: p = ggplot(y2, aes(logFC, -log10(adj.P.Val))) + geom_point(aes(col=sig)) + theme( panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background =…
anamaria
  • 341
  • 3
  • 11
0
votes
0 answers

Rmarkdown chunk output bug (?) (Rstudio: Notebook output)

In a Rmarkdown document, when I use ggplot to plot data (a map in my case) and label points with geom_text_repel from the ggrepel package, the labels disappear when I open the plot in the Rstudio: Notebook output (show in new window). I would like…
Nele
  • 31
  • 5
0
votes
1 answer

DiagrammeR neato org chart (howto add labels to grViz?)

How do I add names (or labels) to a DiagrammeR GraphViz layout? I'd like to add names to each dot below, and I'd like them to be in an organized fashion, not overlapping anything else, a la ggrepel style. You can use any names you wish for the…
Display name
  • 4,153
  • 5
  • 27
  • 75
0
votes
2 answers

One label for multiple points

I'm making a scatterplot and want to label several points with the same label. data.frame(label=rep(c("a","b","c"),2), x=rep(c(1:3),2), y=(5,4,7,2,6,9)) As you can see, the labels occur twice each at the same x values, only y differs. I want both…
user2862862
  • 111
  • 1
  • 1
  • 10
0
votes
0 answers

How do I left justify when using line breaks using ggrepel?

How do I left justify my label using geom_text_repel? In the example below, I would like the word "very" to be underneath the word "this". Here I use the left justify setting i.e., hjust = 0 library(tidyverse) library(ggrepel) mtcars %>% …
John-Henry
  • 1,556
  • 8
  • 20
0
votes
1 answer

Variable align ggrepel text labels in faceted alluvial plot

I am trying to create a faceted alluvial plot with labels for the stratums on the first axis repelled to the left and left justified and the labels on the right repelled to the right and right justified. # Small working example # Install Packages…
zarrar
  • 47
  • 7
0
votes
1 answer

How to display labels at the end of added geom_lines?

I have a dataframe containing several columns. Here is an extract from my data frame: emp_dayNumber emp_dayName emp_workedDays emp_fullPrice emp_halfFare emp_monthly emp_yearly 1 1 mon TRUE 23.7 …
C. Crt
  • 357
  • 2
  • 17
0
votes
0 answers

Plot with ggrepel labels renders very slowly

I've got a ggplot graphic with ggrepel labels that renders in a few seconds on my local quad-core laptop. However, when I attempt to render this same graphic on a server with 32 cores (or even 96 cores), the server requires over 10 minutes. Why is…
Megatron
  • 15,909
  • 12
  • 89
  • 97
0
votes
0 answers

How to prevent geom_text_repel from labeling points on scatter plot with default number ordering list?

My dataset looks like this: I'm trying to create a simple scatter plot with data labels that are names (first and last name). I used geom_text_repel in ggrepel to create data labels, but the labels on the plot are just numbers in the order of the…
user11090853
0
votes
0 answers

Highlight single points in scatter plot with ggplot2 and ggrepel

I want to highlight 4 single points in a scatter plot with a box surrounding the name associated with the plot. I am using ggrepel to create the boxes surrounding the plots and to repel them. This is the code I have: library(ggplot2) gg <-…
1 2 3
13
14