Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying angle of geom_image #33

Open
beckigreen opened this issue Feb 10, 2021 · 2 comments
Open

Modifying angle of geom_image #33

beckigreen opened this issue Feb 10, 2021 · 2 comments

Comments

@beckigreen
Copy link

Hello! Is there any way of changing the angle of geom_image (without writing a new image at each angle)?

e.g.
ggplot(data, aes(x = x, y = y)) + geom_image(aes(image=image, angle=angle))

@AndyBunn
Copy link

Same question. The angle argument seems deprecated.

@Acare
Copy link

Acare commented Feb 3, 2022

Hello,
you can try the image_fun option in the ggimage::geom_image() function. You can also compose multiple transformation (see the magick package) using anonymous functions:

ggimage::geom_image(aes(image = image), 
                    image_fun = \(img) {
                        img |> 
                            magick::image_flop() |> 
                            magick::image_border(color = "grey")
                    }
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants