Questions tagged [direct-labels]

An R package for attaching labels to points, lines and contours in ggplot and lattice plots

directlabels is an R package for attaching labels to points, lines and contours in ggplot2 and lattice plots. The motivation for using directlabels is that the labels, in most instances, are easier to read and interpret than legends; and thus the labels can be used in place of legends.

Examples, vignettes, and links to additional resources are available on the package's old R-forge site and in the directlabels documentation link. Also see the package's github site.

Related tags

48 questions
0
votes
0 answers

Adjust line height in direct labels

I have a line chart to which I want to add labels. The lables have new lines (\n). How do I adjust the lineheight of these labels? I've tried adjusting the text in theme, but it has no apparent effect. (I'd like the lineheight to be reduced in this…
Hugh
  • 15,521
  • 12
  • 57
  • 100
-1
votes
1 answer

ggplot2 barplot - adding percentage labels inside the stacked bars but retaining counts on the y-axis

I have created an stacked barplot with the counts of a variables. I want to keep these as counts, so that the different bar sizes represent different group sizes. However, inside the bar plot i would like to add labels that show the proportion of…
Nneka
  • 1,764
  • 2
  • 15
  • 39
-1
votes
1 answer

How to label the first few points and create non-overlapping labels on a plot using direct.label

How can I easily create a plot where the text is not overlapping? Also How could I create a plot where I just label the first few points? Like the image below, I want to always label the bottom left hand part of the…
user_123
  • 62
  • 12
1 2 3
4