hgd: Initialize httpgd graphics device, start server, and launch...

Description Usage Arguments Examples

View source: R/hgd.R

Description

Initialize httpgd graphics device, start server, and launch viewer.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
hgd(
  host = "127.0.0.1",
  port = 8288,
  width = 720,
  height = 576,
  bg = "white",
  pointsize = 12,
  system_fonts = list(),
  user_fonts = list(),
  recording = TRUE,
  cors = FALSE,
  token = ""
)

Arguments

host

Hostname.

port

Port.

width

Graphics device width (pixels).

height

Graphics device height (pixels).

bg

Background color.

pointsize

Graphics device point size.

system_fonts

Named list of font names to be aliased with fonts installed on your system. If unspecified, the R default families sans, serif, mono and symbol are aliased to the family returned by match_family().

user_fonts

Named list of fonts to be aliased with font files provided by the user rather than fonts properly installed on the system. The aliases can be fonts from the fontquiver package, strings containing a path to a font file, or a list containing name and file elements with name indicating the font alias in the SVG output and file the path to a font file.

recording

Should a plot history be recorded.

cors

Toggles Cross-Origin Resource Sharing (CORS) header. When set to TRUE, CORS header will be set to "*".

token

(Optional) security token string. When set all requests need to include this token to be allowed. (Either in a request header (X-HTTPGD-TOKEN) field or as a query parameter.)

Examples

1
2
3
4
5
6
7
8
## Not run: 

hgd() # instead of httpgd()
# plot stuff
dev.off()
# close the viewer window manually for now

## End(Not run)

hrbrmstr/grandview documentation built on June 2, 2020, 12:03 a.m.