An R package to create scatter-pie plot based on the ggplot2 and ggforce package.
Questions tagged [scatterpie]
39 questions
1
vote
1 answer
Scatterpie: How to add annotation over line connecting pies to mark percent change in y-values between pies
I have a scatterpie plot with pies plotted over x and y axes and a "trend line" connecting them. In the spirit of this answer, I would like to add an annotation over each line to mark the percent increase/decrease between the y-values underlying…

Emman
- 3,695
- 2
- 20
- 44
1
vote
1 answer
Adding percents for pie proportions in each piechart in scatterpie plot
I have a scatterpie plot, and I want to add the percents that correspond to pie proportions, for every single pie in the plot.
This question is a follow-up to a previous question I posted here.
My Data
library(tidyverse)
library(scatterpie)
my_df…

Emman
- 3,695
- 2
- 20
- 44
1
vote
1 answer
Scatterpie doesn't recognize column name from data
I want to plot 8 data points using scatterpie. However, the function is throwing an error that it can't find the object corresponding to the column with values for y-coordinates.
My Data
library(tidyverse)
library(scatterpie)
my_df <-…

Emman
- 3,695
- 2
- 20
- 44
1
vote
1 answer
ggplot, sf package, How make simple pie graph on map
I would like to make pie graph with ggplot and sf package.
I have very simple data and un think there is simple method to do.
All my data are pourcent :
data <- data.frame(Territory = c(1, 2, 3, 4, 5),
Pins = c(25, 45, 45,…

thomas leon
- 153
- 11
1
vote
1 answer
Scale scatterpie plots ggplot
I have this data
structure(list(year = c("2018", "2018", "2018", "2018", "2018",
"2018", "2018", "2018", "2018", "2018", "2018", "2018"), month = c(1,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), Avdischarge = c(906.5947917,
511.2469444, 364.0697222,…

user195366
- 465
- 2
- 13
1
vote
0 answers
Blank spaces when using geom_scatterpie
Good afternoon,
I am using geom_scatterpie (R) to plot pies in different locations around the world. For some of the pies, I have blank spaces and I don't know how to fix the issue
I checked the sum of the percentage for each site and it is equal…

S.Sabour
- 11
- 2
1
vote
1 answer
correct use of colors in scatterpie
I want to make 6 different pies using scatterpie. There are 101 different categories making up the pies (not all pies have 101), so I want to be able to differentiate the colors.
This does not give me enough colors (I can tell just by looking at…

user2814482
- 631
- 1
- 10
- 28
0
votes
0 answers
Persistent errors with 'st_as_sf()' in making scatterpie plots for a species distribution map by country
# Load required packages
library(ggplot2)
library(dplyr)
library(sf)
library(scatterpie)
library(mapdata)
library(tidyr)
# read data
points_gibellula <- read.delim("D:/Downloads/QMUL & RBG Kew/aaa. MSc Course Content/BIO709P - P&F Project/Specimen…

San
- 1
0
votes
1 answer
maps not created correctly with geom_scatterpie
I have an issue with the geom_scatterpie function.
I am using R version 4.1.1, scatterpie_0.2.1 and ggplot2_3.4.2 to create some maps with pie charts.
Unfortunately, as you can see in the attached figures, my maps are not being created…

Christina P
- 3
- 4
0
votes
1 answer
geom_scatterpie with a legend that is unscaled
I would like to have the radius of my piecharts scaled by sample size (n) on a map. However, the variance in n is large, so I would like rescale it on the map, say from 0 to 1 (this could be a log, or anything really). I would like the legend to…

Alex Krohn
- 71
- 5
0
votes
0 answers
ggplot how to plot pie charts on USA map with plot_usmap package or geom_polygon
I want to plot my data over US map and also add pie charts on the map. I used geom_polygon and also plot_usmap with geom_scatterpie but none of them worked. This my data https://iastate.box.com/s/rllzhkfmab475zr4ywur56cd31jhwl8g
f1<-ggplot() +…

Arwen
- 77
- 4
0
votes
0 answers
Error: Discrete value supplied to continuous scale in ggplot + geom_scatterpie
I'm trying to do a map with ggplot and geom_scatterpie function but I'm keep receiving this error: "Error: Discrete value supplied to continuous scale"
the code is the following:
ggplot() +
geom_tile(data = my_raster, aes(x = x, y = y, fill =…

Aedan-1996
- 1
- 3
0
votes
0 answers
Is there an R function for pie chart on a ggplot map that work with this kind of data?
For my master thesis I would need to do a map (possibly with ggplot) with pie charts on it, I've read many threads about the library scatterpie but it doesn't work with my data.
My data are something like…

Aedan-1996
- 1
- 3
0
votes
1 answer
Why are dates showing as numbers instead of as months in ggplot in R?
My x axis is showing number instead of months, how can I modify so it shows January, February and March?
data<- data.frame(Dates= rep(
seq(as.Date('2017-01-01'), as.Date('2017-03-03'), by = 'months')),
A=c(28.0,20.6,15.8),
B=…

Ecg
- 908
- 1
- 10
- 28
0
votes
0 answers
Scatterpie pie colour changes according to value
I'm using the scatterpie package to produce piecharts on a map. However, the 3 pie segments E, S, AC will have different colours depending on their values at each location. I'm not familiar with scatterpie but I cannot seem to find the best way to…