Is it possible to remove the background of images with the magick package?
I know how to use edge detection with Gimp/Inkscape to crop out silhouettes; however, I'm looking to automate the process for a large batch of images with R.
My ultimate goal…
I try to make a bubble chart with ggplot/ggimage by including the country flag. Here is a reproducible example:
library(dplyr)
library(ggplot)
library(ggimage)
A <- data.frame(X = c(1,4,5), Y = c(10, 1, 5), Z = c(1, 2, 3)/30, Country = c("FR",…
I want to create a timeline plot that roughly resembles the example below: lots of overlap at some points, not a lot of overlap at others.
What I need: overlapping images should repel each other where necessary, eliminating or reducing overlap.…
I'm trying to build a visualisation with both drawn shapes (e.g. using geom_circle) and images. In both cases, I want to be able to position them on the page specifically with coordinates, rather than using one of the built in chart types.
See…
I was wondering whether it is possible to add shapes to the legend for ggimage(). I found similar questions, but they either have 1) same picture with a different color in legend, or 2) same picture different colors. I used this link to add images…
I am currently working on a problem with R. I'm pretty new to R so I lack of experience, on a (I guess) simple issue.
I have a problem with scaling an image in relation to some data I have.
The Image is a floor plan. The data I have is recorded…
This will be cross posted on R's mailing list.
I have the map as a png, so I won't be using the get_map function.
I have extracted the raster data from the png, and I wish to load the map as it is on the display of R, and then I would like to plot…
i'm trying to build a dotplot with an image diplayed at every data point instead of just a bland point. I have tried many methods of introducing the data to R, and this is the closest ive gotten. In my data sheet I have a column with either NY_Male,…
Is there a way to use geom_image to replace text labels to images in a pie chart?
I tried using the code below.
However, the images aren't in the same position as the labels. (I included the labels to show where the images should go but I want to…
I like to use some icons and images in my ggplot, thus use the ggimage package. I can make it work with local or online images in .png format. But it does not work with svg such as…
I'm a football data analyst using NFL team logos as my points on a scatterplot. However, these images will sometimes cover each other up. I want to find a way to repel a label for those images that are overlapping with one another. However, I…
I'm looking for a way to plot over an image with predefined fields and get a result like this:
I want to build it from:
(1): a PNG image with the fields with predefined x and y limits like this:
and (2): a scatterplot, e.g.:
mpg %>%
ggplot() +
…
I am trying to plot some data (mainly character data, unfortunately) and I wanted to use geom_flag to create little flag images to put under the labels on the x axis (x = Country) to make it more clear since I cannot write the full country name (it…
This was not happening before, and then at some point my size function just kind of broke to the point where any attempt to specify size causes the images to inflate to a ridiculous size. Here is the code where I set the size to .1:
G <- ggplot(G1,…
I am trying to insert a logo in my plot using geom_image(). The original logo is available here:
https://www.itvoice.in/wp-content/uploads/2016/12/zebronics_footer_logo.png
and looks like this:
When I make a ggplot using the code below, I get this…