Skip to content

Commit

Permalink
Updated version to 0.3.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanedwards committed Nov 22, 2017
1 parent 0a5887e commit 50de18d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Type: Package
Title: Freshing Up your 'ggplot2' Plots
URL: https://github.com/stefanedwards/lemon
BugReports: https://github.com/stefanedwards/lemon/issues
Version: 0.3.9000
Date: 2017-09-12
Version: 0.3.3
Date: 2017-11-22
Authors@R: c(
person('Stefan McKinnon', 'Edwards', email='sme@iysik.com',
comment=c(ORCID='0000-0002-4628-8148'),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

* **TODO:** Extend `lemon_print` to work on cross-tabulation tables.

# lemon 0.3.3

* Added argument `offset` to `reposition_legend` to better nudge legend into place.

* `brackets_horizontal` and `brackets_vertical` now uses 'npc' as default
Expand Down
16 changes: 7 additions & 9 deletions vignettes/legends.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ grid.arrange(p1+theme(legend.position='hidden'), p2+theme(legend.position='hidde

There is however currently a shortcoming in `grid.arrange` and `arrangeGrob`
that prevents it from using the full gtable object returned from `g_legend` in
the margin arguments. We therefore subset to a specific grob[^gridExtra_fix].
the margin arguments. We therefore subset to a specific grob.

What worse is, if the legend contains multiple guides, the above approach will
not work directly. However, defining several `arrangeGrob` within each other
Expand Down Expand Up @@ -338,10 +338,12 @@ g <- reposition_legend(p, 'top left', plot=TRUE)
It has since propogated throughout
[Stack Overflow](http://www.stackoverflow.com) answers.

`grid_arrange_shared_legend` was originally proposed by
[Shaun Jackman](http://rpubs.com/sjackman) [original code](http://rpubs.com/sjackman/grid_arrange_shared_legend)
which was further refined by `baptiste` at
[ggplot2's wiki](https://github.com/tidyverse/ggplot2/wiki/Share-a-legend-between-two-ggplot2-graphs).
Originally brought to you by
(Baptiste Auguié)[http://baptiste.github.io/]
(<https://github.com/tidyverse/ggplot2/wiki/Share-a-legend-between-two-ggplot2-graphs>)
and
(Shaun Jackman)[http://rpubs.com/sjackman]
(<http://rpubs.com/sjackman/grid_arrange_shared_legend>).
It has been further modified here.

`reposition_legend` was coded by [Stefan McKinnon Edwards](http://www.iysik.com/)/
Expand All @@ -356,7 +358,3 @@ d <- ggplot(dsamp, aes(carat, price)) +
reposition_legend(d + theme_gray(base_size=26), 'top left')
```


[^gridExtra_fix]: We have submitted a solution to gridExtra that should allow
the use of the entire gtable in the margin arguments:
https://github.com/baptiste/gridextra/issues/39

0 comments on commit 50de18d

Please sign in to comment.