Skip to content

another solution for paint_pomological #2

Open
@GuangchuangYu

Description

@GuangchuangYu
library(ggpomological)
basic_iris_plot <- ggplot(iris) +
  aes(x = Sepal.Length, y = Sepal.Width, color = Species) +
  geom_point(size = 2)

basic_iris_plot <- basic_iris_plot + scale_color_pomological()
pomological_iris <- basic_iris_plot + theme_pomological_fancy()

library(ggimage) ## `geom_image`, `geom_subview` and `theme_transparent`

ggplot(d=data.frame(x=0:1, y=0:1), aes(x, y)) + 
    geom_image(image=ggpomological:::pomological_images("background"),size=Inf) + 
    geom_subview(subview= pomological_iris+ theme_transparent(), width=Inf, height=Inf, x=.5, y=.5) +
    theme_void()

The output is still gg object.

PS: I am the author of ggimage.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions