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
Dear, I have a set of images in png with transparent backgroung generated via: ggsave(filename = "image1.png",plot = my_ggplot,width = 4, height = 4,dpi=150, bg='transparent')
Now when, I use ggimg the transparent background is plotted as balck. I used a code like this ggplot(df[1:10,],aes(x=.data[[names(df)[1]]], y=.data[[names(df)[2]]]))+ geom_point_img(aes( x = .data[[names(df)[1]]], y = .data[[names(df)[2]]], img = "image1.png" ), size = 1)+ theme_minimal()
There is a way to tell to goem_point_img to cosider transparent background?
The text was updated successfully, but these errors were encountered:
By looking at code we can see a hint in comment on unexported function fix_img_dims in funs.R.
# Takes an input image file (either an array or matrix), along with a scalar
# alpha value, and returns an array that will always have four channels; set
# alpha to a negative number to avoid overwriting any present opacity values
By setting alpha parameter of geom_point_img or geom_rect_img to a negative value seems to solve the problem.
Dear, I have a set of images in png with transparent backgroung generated via:
ggsave(filename = "image1.png",plot = my_ggplot,width = 4, height = 4,dpi=150, bg='transparent')
Now when, I use
ggimg
the transparent background is plotted as balck. I used a code like thisggplot(df[1:10,],aes(x=.data[[names(df)[1]]], y=.data[[names(df)[2]]]))+ geom_point_img(aes( x = .data[[names(df)[1]]], y = .data[[names(df)[2]]], img = "image1.png" ), size = 1)+ theme_minimal()
There is a way to tell to goem_point_img to cosider transparent background?
The text was updated successfully, but these errors were encountered: