Description Usage Arguments Functions Viewports Header Examples
Plot gauge charts using grid graphics package.
1 2 3 4 5 6 7 8 9 10 11 12 | gaugeChart(value, min, max, sectors = gaugeChartSectors(), header, label,
gp = gpar(), vp, fmt = NULL)
.gaugeHeader(header, vp)
.gaugeDisplay(x, min = 0, max = 1, label = NULL, fmt = NULL,
gp.beam = gpar(), vp)
.gaugeAxis(min = 0, max = 1, label = NULL, fmt = NULL, r = c(0.6, 1),
n = 5)
.gaugeBeam(x, r = c(0.6, 1), gp = gpar())
|
value |
numeric, value to display |
min, max |
numeric, minimum and maximum value for gauge chart axis |
sectors |
an object of gaugeChartSectors-class specifying the the sectors for gaug chart axis |
header |
string, header of the gauge chart, see header section below |
label |
string, label for the gauge chart axis |
gp |
an object of class gpar |
vp |
an viewport object defining the plot region for the gauge chart, see viewports section below |
fmt |
opional format string, if supplied, the |
gp.beam |
an object of class gpar specifying the gauge chart's beam's color |
r |
numeric, inner and outer radius for gauge chart axis |
n |
number of steps for the shading of the axis background |
.gaugeHeader: Plot the gauge chart's header.
.gaugeDisplay: the main auxilliary function for plotting gauge
charts.
.gaugeAxis: Plot the gauge chart's axis.
.gaugeBeam: Plot gauge chart's beam.
The different parts of the gauge chart will be shown in separate
viewports. All viewports inherit from the parent
viewport vp. If vp is not given, the current
plot region will be taken as paren viewport.
The gauge chart will be displayed in a separate viewport with aspect ratio (i.e. width to height) of 2. The viewport will be fitted in 95 parent viewport's width and height.
The axis labels will be plotted below the viewport with an offset of
unit(0.5, "lines").
If header is given, the gaug chart's viewport will be
split in two viewports. The upper one has a height of
unit(4, "lines") and contains the header.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
sectors <- gaugeChartSectors(200, 100, 0, rev = TRUE)
pushViewport(gp = gpar(fontsize = 9, col = '#d7d7d7', fill = 'white'))
gaugeChart(125, 0, 300, header = 'Tagesanmeldungen',
sectors = sectors, label = 'on risk')
popViewport()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.