-
Notifications
You must be signed in to change notification settings - Fork 24
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
Inverted raster images #63
Comments
It is the same output as both quartz and Cairo on my computer (I know this is borderline "works on my computer" comment, but it's just for reference :-) |
For me, purple is on top and also the y axis is inverted - 0 on top and the plotted point in the upper left. I’m not sure how your image is ignoring the scale_y_reversed() part of the plot.
… On 19 Nov 2020, at 07:36, Thomas Lin Pedersen ***@***.***> wrote:
This is the file I get when rendering the file with your code (the last part, using ragg)... Is this not what is expected?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Ah - I was on the dev version of ggplot2... (FYI, setting the limits in the coord may end up affecting the direction of the scale in future versions) |
However, you may be right that you wouldn't expect |
Do you have access to a windows machine? What is the behaviour of the default windows device in case you can test? |
Thanks for looking into this. Seems I lucked into the one device that did what I want. I don't have easy access to a windows machine, sorry. The context is plotting face images with a pre-existing associated coordinate system that starts in the upper left. I guess I'll just switch the plotting function to reverse the y coordinates, since I don't normally include the axes. |
Yeah, I agree that the behaviour is unwanted, but it should be fixed in ggplot2, not in the device |
When displaying the background image in a ggplot using
annotation_custom()
and a rasterGrob, the image is inverted if the y-axis is reversed, but only when ragg is the graphics device. This doesn't happen with other graphics devices like quartz_png, which show the image upright. So the same code can produce different graphs depending on the render environment (e.g., knitr vs pkgdown).See https://debruine.github.io/imginv/articles/test.html for a demonstration of the problem in situ.
This should reproduce the problem.
The text was updated successfully, but these errors were encountered: