print.gsplot | R Documentation |
Shows gsplot in the plot window.
## S3 method for class 'gsplot'
print(x, ...)
x |
gsplot object |
... |
Further graphical parameters may also be supplied as arguments. |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.