print.gsplot: gsplot show

View source: R/print.R

print.gsplotR Documentation

gsplot show

Description

Shows gsplot in the plot window.

Usage

## S3 method for class 'gsplot'
print(x, ...)

Arguments

x

gsplot object

...

Further graphical parameters may also be supplied as arguments.

Examples

gs <- gsplot() %>%
   points(1, 2, legend.name="Cool points", xlim=c(0,NA)) %>%
   lines(x=1:5, y=1:5, legend.name="Cool lines", ylab='taco night') %>%
   legend(location="topleft")
print(gs)

# dropping 'print()' around the object works the same way 
# (however, use 'print()' explicitly when in a loop)
gs <- gsplot() %>%
   points(1, 2, legend.name="Cool points", xlim=c(0,NA)) %>%
   lines(x=1:5, y=1:5, legend.name="Cool lines", ylab='taco night') %>%
   legend(location="topleft")
gs

gs <- gsplot() %>%
   points(1, 2) %>%
   lines(x=1:5, y=1:5, side=c(3,4)) 
gs

USGS-R/gsplot documentation built on April 17, 2023, 8:45 p.m.