Closed GuangchuangYu closed 7 years ago
ggtree::subview now moved to ggimage::geom_subview and ggtree::theme_transparent move to ggimage::theme_transparent.
ggtree::subview
ggimage::geom_subview
ggtree::theme_transparent
ggimage::theme_transparent
The width and height are now not proportion to the plot, but in native unit.
Here is an example:
library(ggimage) d=tibble::data_frame(x=1:3, y=1:3, z=LETTERS[1:3]) d$bar = lapply(1:nrow(d), function(i) ggplot(d[i,], aes(z, y)) + geom_col()) ggplot() + xlim(0, 4) + ylim(0,4) + geom_subview(d$bar, x=d$x, y=d$y, width=1, height=1)
Sorry for changing the unit and break your codes again. 😂
In this new version, I have split the sticker function to several layer.
sticker
Now we can use the following command to generate sticker:
ggplot() + geom_hexagon() + geom_subview() + geom_pkgname() + theme_sticker()
hexagon is a short cut for ggplot() + geom_hexagon() + theme_sticker().
hexagon
ggplot() + geom_hexagon() + theme_sticker()
see https://github.com/GuangchuangYu/hexSticker/commit/9828a7899e5144395a361cdc599d2ed738b77cda.
@lgatto @jotsetung
an example of using geom_subview, https://github.com/GuangchuangYu/ggimage/issues/3.
geom_subview
ggtree::subview
now moved toggimage::geom_subview
andggtree::theme_transparent
move toggimage::theme_transparent
.The width and height are now not proportion to the plot, but in native unit.
Here is an example:
Sorry for changing the unit and break your codes again. 😂
In this new version, I have split the
sticker
function to several layer.Now we can use the following command to generate sticker:
hexagon
is a short cut forggplot() + geom_hexagon() + theme_sticker()
.see https://github.com/GuangchuangYu/hexSticker/commit/9828a7899e5144395a361cdc599d2ed738b77cda.
@lgatto @jotsetung