You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to use rphylopic but for some reason it is not showing up in the plot (by ggplot2) at all. I am simply copying and pasting the Iris example in the introduction vignette. R takes a few seconds to load the image and work on the ggplot call but then only the points show up and there's simply no image. Saving the file also didn't help.
Hi @tungxphung, this does seem to be a bug that has creeped in with our latest release. It seems to be an issue with the automatic sizing of the silhouette. If you set ysize to a large value, you will see it is actually being plotted.
library(ggplot2)
library(rphylopic)
ggplot(iris) +
add_phylopic(x = 6.1, y = 3.2, name = "Iris", alpha = 0.2, ysize = 500) +
geom_point(aes(x = Sepal.Length, y = Sepal.Width))
But there seems to also be an issue with the silhouette being plotted upside down, which also needs fixing. For now you can do this by specifying angle.
library(ggplot2)
library(rphylopic)
ggplot(iris) +
add_phylopic(x = 6.1, y = 3.2, name = "Iris", alpha = 0.2,
ysize = 500, angle = 180) +
geom_point(aes(x = Sepal.Length, y = Sepal.Width))
We are both currently in the middle of moving house but we will look into this next week.
Hi @tungxphung, this is now resolved in the development version of rphylopic on GitHub. If you install the development version, everything should work properly:
Hello, I am trying to use rphylopic but for some reason it is not showing up in the plot (by ggplot2) at all. I am simply copying and pasting the Iris example in the introduction vignette. R takes a few seconds to load the image and work on the ggplot call but then only the points show up and there's simply no image. Saving the file also didn't help.
However, the image shows up when added to the plot created by base plot()
I am using R/Rstudio 4.3.1. and have only rphylopic and ggplot2 loaded. Any chance you are aware of display issues with ggplot2?
The text was updated successfully, but these errors were encountered: