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

Why does text appear in the legend?

library(ggplot2) library(ggrepel) set.seed(1234) ss <- sample(1:32, 10) df <- mtcars[ss, ] ggplot(df, aes(wt, mpg))+ geom_point(col = "red") + geom_label_repel(aes(label = rownames(df), fill = factor(cyl)), size = 5, hjust =…
M.R.Wani
  • 107
  • 1
  • 11
0
votes
1 answer

Use mouse to manually adjust geom_text() position?

Just wondering if there is any package/functionality to manually manipulate the positioning of text from geom_text()? I've been using ggrepel::geom_repel_text() for positioning without overlap, which is good for most cases, but when I have a ton of…
Brandon
  • 1,722
  • 1
  • 19
  • 32
0
votes
1 answer

use ggrepel to display mean value as a text label

I am creating a plot where I want to display mean value. I have managed to display both the mean and its corresponding value, but I find the plots to be too cluttered with the mean values thrown in, so I wanted to use ggrepel::geom_label_repel to…
Indrajeet Patil
  • 4,673
  • 2
  • 20
  • 51
0
votes
1 answer

Grouping factor levels to avoid overlap in ggplot2

I am making sort of a number line graph with the help of ggplot2 and facing the problem of text labels overlapping each other. I have also used geom_text_repel package to avoid text overlapping, but it becomes increasingly messy as more and more…
Shakir
  • 343
  • 5
  • 23
0
votes
0 answers

Trying to install ggrepel for use with qicharts but getting a non-zero exit status

I was trying to add library(qicharts) to my R script. However, when I tried to load it, it told me I needed ggrepel. I downloaded the ggrepel archive and tried to install it but I received a warning: installation of package [filepath] had a non-zero…
Neal
  • 199
  • 3
  • 16
0
votes
0 answers

ggplot labels overlapped by abline

I am using the geom_label_repel function to arrange labels in a way that avoids overlapping but when I add an regression line to my plot, then it itself overlaps the labels. ggplot(globalMetrics, aes(x=globalMetrics$popDensity,…
iskandarblue
  • 7,208
  • 15
  • 60
  • 130
0
votes
1 answer

R ggrepel: hiding some labels

Hi I been getting Aesthetics error when trying to only display labels for certain subsets. For example. library("ggplot2") library(gplots) library(ggrepel) set.seed(10) data <- data.frame(label=letters[1:21], number= runif(21, min=0,…
Ahdee
  • 4,679
  • 4
  • 34
  • 58
0
votes
0 answers

How to suppress some (but not all) segment lines in ggrepel in R

I'm using ggplot2 to graph two different groups of data. I have too many points and so when I label them they overlap. This caused me to need to use ggrepel with ggplot2. I need to make the size and color of these groups different, which I was able…
J. Sweet
  • 15
  • 8
-1
votes
1 answer

R ggplot- line labels to right of plot without overlapping

To preface, I'm relatively new to R and trying to replicate a previous user's inquiry found here: Stackoverflow question. Instead of the data being in days, and looking only at more recent set of dates, I want to include all points of time, in…
a_swoosh
  • 23
  • 7
-1
votes
1 answer

"Error in eval(expr, envir, enclos) : object 'y' not found" and "Removed 1 rows containing missing values (geom_text)"

It says that the error is in the "library(ggplot2)" line and I don't know how to fix it. Here's the code I was using: library(ggplot2) library('remotes') remotes::install_github("GuangchuangYu/nCov2019", dependencies =…
-2
votes
3 answers

Underline part of text label in ggplot

I am trying to make a label that is made up of a book title and book author. I would like to underline the title, but not the author, in the label. Here is the MWE data: Title,Author,Pages,Date Started,Date Finished underline('Time Travel'),'James…
Adam_G
  • 7,337
  • 20
  • 86
  • 148
1 2 3
13
14