Description Usage Arguments Details Value Note Author(s) Examples
setGraphParams
may be used to change graphical settings in a manner similar
to the lattice
package's function trellis.par.set
, while getGraphParams
is similar to trellis.par.get
. Settings apply globally and to all plots generated by
this package, and don't just apply to devices.
1 2 3 4 5 6 7 | setAllGraphParams(settings)
getAllGraphParams()
setGraphParams(field, setting)
getGraphParams(field)
|
settings |
A full list of graphical parameters. See the documentation for RNMGraphics. |
field |
A string with the name of the field/option (e.g. loess.line) that the user wishes to change or retrieve |
At the moment, the following fields exist:
plot.symbol
- The plot points which appear in scatter plots.
superpose.symbol
- The plot points which appear in scatter plots whenever a grouping variable is used.
plot.line
- The plot lines which appear in scatter plots, whenever lines are chosen to connect data rather than points.
plot.text
- The plot labels that appear in scatter plots when type "i"
is used.
loess.line
- The loess smoother curve which can be added to scatter plots.
histogram
- The fill colour and outline colour of histogram rectangles.
refline
- The reference lines that can be added to many plots.
barchart
- The fill colours of polygons used in nmBarchart
.
axis.text
- The text that appears in y- and x-axis labels.
box.rectangle
- The rectangles in box plots.
title.text
- The plot main title text.
grid
- The reference/background grid text.
strip.bg
- Strip background settings
layout.heights
- Equivalent to the lattice setting of the same name
layout.widths
- Equivalent to the lattice setting of the same name
strip
- Strip function to use
panelLayout
- Currently unused
panelMisc
- Miscellaneous controls over lattice panels
legend
- Settings for the legend.
setGraphParams
returns nothing. getGraphParams
returns a list with the configuration for the particular field/option chose,
and getAllGraphParams
returns a list (of lists) with all current configuration information.
Some of these settings and their implementations will almost certainly change in forthcoming releases.
Mango Solutions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
nmScatterPlot(mtcars, xVars = "wt", yVars = "mpg, disp")
plot.symbol <- getGraphParams("plot.symbol")
old.plot.symbol <- plot.symbol
plot.symbol$col <- "black"; plot.symbol$pch = 1
setGraphParams("plot.symbol", plot.symbol)
nmScatterPlot(mtcars, xVars = "wt", yVars = "mpg, disp")
setGraphParams("plot.symbol", old.plot.symbol)
## End(Not run)
# getAllGraphParams
res <- getAllGraphParams()
# setGraphParams
setGraphParams("plot.text", list(alpha=1000, cex=1000, col="orange"))
getGraphParams("plot.text")
# getGraphParams
res <- getGraphParams("legend")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.