Questions tagged [r-lemon]

is a [ggplot2] and [knitr] extension package for the R environment. Do not confuse this tag with [lemon], a C parser generator, and LEMON ([lemon-graph-library]), a C++ Library for Efficient Modeling and Optimization in Networks.

lemon is another and extension package for the R environment.

The package is mostly used to enhance ggplot2 in the domain of:

  • Axis lines.
  • Repeated axis lines on facets.
  • geom_pointpath and geom_pointline.
  • Legends

As well as some functions in knitr.

Further references:

GitHub: https://github.com/stefanedwards/lemon

CRAN: https://cran.r-project.org/package=lemon

Note:

Do not confuse this tag with , a C parser generator, and LEMON (), a C++ Library for Efficient Modeling and Optimization in Networks. There is also , a Java library for developing REST APIs using the Spring Framework and Spring Boot.

6 questions
6
votes
1 answer

cbind on ggplotGrob objects fails with "Error in mmm < each : comparison of these types is not implemented"

This appears to be similar to an issue that @baptiste was trying to work around back in 2014. I am revisiting code I wrote back in June that involved creating three ggplotGrobs and combining them with a call to cbind. Now, this code fails with the…
scooteR
  • 185
  • 7
4
votes
1 answer

R: Reliable conversion between gtable and ggplot objects. How to make lemon::reposition_legend() work after ggplot_build()?

I have a pretty complicated case at hand with ggplot2. I tried to exemplify it with a MWE using iris data below. I just have boxplots in facets, and wanted to move the legend to take the space of the empty facets. This is all good, I use…
DaniCee
  • 2,397
  • 6
  • 36
  • 59
2
votes
1 answer

Add a common legend

I was trying to do a multiplot with ggplot2. This was my initial code nucmer_s1 <- ggarrange(eight_uniform, ten_uniform, twelve_uniform, fourteen_uniform, sixteen_uniform, ncol=3, nrow=2, common.legend = TRUE,…
Bertha
  • 55
  • 1
  • 6
1
vote
0 answers

facet_rep_wrap repeat.tick.labels=F still displays all axes

I have a grid of several density plots, but for readability I would like to display to the axes on only one, not all of them. I came across facet_rep_wrap from the lemon package, what is supposedly doing what I want, but it still displays all axes.…
Anke
  • 527
  • 1
  • 6
  • 19
0
votes
1 answer

How to not automatically sort my y axis bar plot in ggplot & lemon

I am trying to display data by Species that has different values depending on group Letter. The best way I have found to display my data is by putting my categorical data on the y-axis and displaying the Total_Observed on the x-axis. Lemon allows me…
M Doster
  • 37
  • 5
0
votes
1 answer

Different x and y axis scales in multifaceted scatter ggplot2

I have used lemon package with ggplot2 for plotting multifaceted scatter plot with regression and confidence interval line using the following code library(tidyverse) library(lemon) #Plotting ggplot(data_calibration, aes(Observed,Predicted))+ …
UseR10085
  • 7,120
  • 3
  • 24
  • 54