plus-.g2: Add components to a plot

+.g2R Documentation

Add components to a plot

Description

G2 options is named

Usage

## S3 method for class 'g2'
opt1 + opt2

Arguments

opt1

result from g2() or +.g2

opt2

opt generated by g2_ family (g2mark) or other spec api (g2style, ...)

Details

  1. if opt2.class is g2mark then append opt into opt1.children

  2. if opt1.type is spaceLayer or spaceFlex: check if opt2.encode exist

  3. if opt2.class is g2spec then modify opt1 with opt2 (spec in view or composite level)

  4. spec of mark will not use + operation, they configured in g2_xxx()

  5. the other option of view and composite are configured by g2()

  6. remove elements with null value and remove empty list


13kay/rg2 documentation built on June 25, 2024, 7:26 a.m.