g2: g2

View source: R/rg2.R

g2R Documentation

g2

Description

g2() render a G2Plot

Usage

g2(opt, width = NULL, height = NULL)

Arguments

opt

G2Plot options build from plot function with prefix 'g2_' and 'g2_opt()'

width

optional number default: 400. width of the chart.

height

optional number default: 400. height of the chart.

See Also

Other g2: g2_area(), g2_bar(), g2_bidirectional_bar(), g2_box(), g2_bullet(), g2_chord(), g2_circle_packing(), g2_column(), g2_dual_axes(), g2_funnel(), g2_gauge(), g2_heatmap(), g2_histogram(), g2_line(), g2_liquid(), g2_pie(), g2_progress(), g2_radar(), g2_radial_bar(), g2_ring_progress(), g2_rose(), g2_sankey(), g2_scatter(), g2_stock(), g2_sunburst(), g2_tiny_area(), g2_tiny_column(), g2_treemap(), g2_venn(), g2_violin(), g2_waterfall(), g2_word_cloud()

Examples

g2_liquid(0.6) |>
  g2_opt(pattern=list(type='line')) |>
  g2()

g2_scatter(iris,'Sepal.Length','Sepal.Width',colorField='Species') |>
  g2_opt(
    legend=list(position='right'),
    shape='circle'
 ) |>
 g2()


13kay/rg2 documentation built on Feb. 16, 2024, 10:22 p.m.