Description Usage Arguments Examples
View source: R/plotScatterPie.R
plot scatter pie chart for multidimension analysis, such as waternomics. This plot can provide information about water use/wastewater of each provinces and GDP mix of each provinces, see examples.
1 2 3 4 5 6 7 8 9 |
data |
a dataframe with colnames x, y, r, label, these four names must be in colnames. |
pieRange |
define which column to which column to be presented by pie chart, see examples |
pieColor |
color for different colors in pie chart |
xmeanLine |
if plot x mean line |
ymeanLine |
if plot y mean line |
label_on |
Whether to show label |
output |
if you want an ggplot object as output, default is FALSE |
1 2 3 4 5 6 7 8 9 10 11 12 13 | GDPColor_CWR <- c("#6B8033", "#020303", "#0D77B9")
data(GDPmix)
# in colnames(GDPmix), there must be x, y, r, label.
# but right now, GDPmix has x, y, r, but lacks a label column, let's assign label to province column
colnames(GDPmix)[1] <- 'label'
## Not run:
plotScatterPie(GDPmix, pieRange = 4:6, pieColor = GDPColor_CWR)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.