scatterpie

Pie charts in geom_scatterpie overlapping

自闭症网瘾萝莉.ら 提交于 2021-01-29 20:12:17
问题 I would like to find a way to keep pie charts in scatterpie from overlapping with one another. I know that I can further reduce the radius, but don't want to make them any smaller than they already are. Position=jitter does not work well at all. Here is a reproducible example: library(ggplot2) library(ggmap) library(scatterpie) data=data.frame(lat=c(52,52,51.5),long=c(4.1,5.5,6),radius=c(5,10,13),A=c(0.2,0.2,0.2),B=c(0.8,0.8,0.8)) map=get_map(location=c(3,50,7,54),source="google") ggmap(map)

Scatterpie doesn't recognize column name from data

て烟熏妆下的殇ゞ 提交于 2021-01-28 19:45:13
问题 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 <- structure(list(day_in_july = 13:20, yes_and_yes = c(0.611814345991561, 0.574750830564784, 0.593323216995448, 0.610539845758355, 0.650602409638554, 0.57429718875502, 0.575971731448763, 0.545454545454545), yes_but_no = c(0.388185654008439, 0.425249169435216, 0

ggplot, sf package, How make simple pie graph on map

被刻印的时光 ゝ 提交于 2021-01-28 11:36:02
问题 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, 60, 75), oak = c(45, 50, 45, 20, 15), land = c(30, 5, 10, 20, 10), sum = c(100, 100, 100, 100, 100)) And my graph code : read_sf("territories.shp") %>% left_join(data, by = "Territory") %>% ggplot() + geom_sf(aes(fill = Pins), color = "black") + theme_bw() + xlab("") + ylab

Making a scatter plot of multiple pie charts of differing sizes, using ggplot2 in R

对着背影说爱祢 提交于 2019-11-29 12:45:29
I have a data frame containing the following data: > data_graph # A tibble: 12 x 4 # Groups: ATTPRO, ATTMAR [?] x y group nb <dbl> <dbl> <chr> <int> 1 0 0 1 1060 2 0 0 2 361 3 0 0 3 267 4 0 1 1 788 5 0 1 2 215 6 0 1 3 80 7 1 0 1 485 8 1 0 2 168 9 1 0 3 101 10 1 1 1 6306 11 1 1 2 1501 12 1 1 3 379 My objective is to have the following chart: Both x and y , qualitative variables, to be put as X/Y axis nb , quantitative variable, representing pie size group , qualitative variable, representing pie parts The best result approching this using ggplot2 package is only giving me bubbles, with this

Making a scatter plot of multiple pie charts of differing sizes, using ggplot2 in R

和自甴很熟 提交于 2019-11-28 06:13:44
问题 I have a data frame containing the following data: > data_graph # A tibble: 12 x 4 # Groups: ATTPRO, ATTMAR [?] x y group nb <dbl> <dbl> <chr> <int> 1 0 0 1 1060 2 0 0 2 361 3 0 0 3 267 4 0 1 1 788 5 0 1 2 215 6 0 1 3 80 7 1 0 1 485 8 1 0 2 168 9 1 0 3 101 10 1 1 1 6306 11 1 1 2 1501 12 1 1 3 379 My objective is to have the following chart: Both x and y , qualitative variables, to be put as X/Y axis nb , quantitative variable, representing pie size group , qualitative variable, representing