legend: Legend settings for g2plot

Description Usage Arguments Examples

Description

Legend settings for g2plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
legend(
  gWidget,
  legend = TRUE,
  layout = NULL,
  position = NULL,
  title = NULL,
  offsetX = NULL,
  offsetY = NULL,
  background = NULL,
  flipPage = NULL,
  itemWidth = NULL,
  itemHeight = NULL,
  itemName = NULL,
  itemValue = NULL,
  itemSpacing = NULL,
  animate = NULL,
  animateOptio = NULL,
  label = NULL,
  marker = NULL,
  maxWidth = NULL,
  maxHeight = NULL,
  rail = NULL,
  reversed = NULL,
  min = NULL,
  max = NULL,
  value = NULL,
  slidable = NULL,
  track = NULL,
  handler = NULL,
  custom = NULL,
  items = NULL
)

Arguments

gWidget

object for g2plot

layout

layout for legend

items

Examples

1
2
data<-data.frame(type=c('分类1','分类2','分类3','分类4','分类5','其他'),value=c(1:6))
g(data,plot_type = 'pie') %>%pie(radius = 1 )%>%g2plot::aes(x='value',y='value',color = 'type') %>%legend(position = 'left',layout = 'vertical')

GOUYONGCHAO/g2plot documentation built on March 31, 2021, 1:49 p.m.