Last chance! 50% off unlimited learning
Sale ends in
plot_RadialPlot(data, na.exclude = TRUE, negatives = "remove",
log.z = TRUE, central.value, centrality = "mean.weighted",
mtext, summary, summary.pos, legend, legend.pos, stats, plot.ratio,
bar.col, y.ticks = TRUE, grid.col, line, line.col, line.label,
output = FALSE, ...)
data.frame
or RLum.Results
object
(required): for data.frame
two columns: De (data[,1]
)
and De error (data[,2]
). To plot logical
(with default): excludes NA
values from
the data set prior to any further operations.character
(with default): rule for negative values. Default
is "remove"
(i.e. negative values are removed from the data set).logical
(with default): Option to display the z-axis
in logarithmic scale. Default is TRUE
.numeric
: User-defined central value, primarily used for
horizontal centering of the z-axis.character
(with default): measure of centrality, used for
automatically centering the plot and drawing the central line. Can be
one out of "mean"
, "median"
, "mean.weighte
character
: additional text below the plot title.character
(optional): adds numerical output to the plot.
Can be one or more out of: "n"
(number of samples), "mean"
(mean De
value), "mean.weighted"
(error-weighcharacter
vector (optional): legend content to be added
to the plot.character
: additional labels of statistically important
values in the plot. One or more out of the following: "min"
,
"max"
, "median"
.numeric
: User-defined plot area ratio (i.e. curvature of
the z-axis). If omitted, the default value (4.5/5.5
) is used and
modified automatically to optimise the z-axis curvature.
The paramelogical
: Option to hide y-axis labels. Useful for data
with small scatter.numeric
: numeric values of the additional lines to be
added.character
: labels for the additional lines.logical
: Optional output of numerical plot parameters.
These can be useful to reproduce similar plots. Default is FALSE
.xlab
must be a vector of length 2,
specifying the upper and lower x-axes labels.plot = "FALSE"
, e.g. to return only numeric plot output.
Earlier versions of the Radial Plot in this package had the 2-sigma-bar
drawn onto the z-axis. However, this might have caused misunderstanding
in that the 2-sigma range may also refer to the z-scale, which it does
not! Rather it applies only to the x-y-coordinate system (standardised
error vs. precision). A spread in doses or ages must be drawn as lines
originating at zero precision (x0) and zero standardised estimate (y0).
Such a range may be drawn by adding lines to the radial plot (
line
, line.col
, line.label
, cf. examples).plot
, plot_KDE
, plot_Histogram
## load example data
data(ExampleData.DeValues, envir = environment())
ExampleData.DeValues <-
Second2Gray(values = ExampleData.DeValues, dose_rate = c(0.0438,0.0019))
## plot the example data straightforward
plot_RadialPlot(data = ExampleData.DeValues)
## now with linear z-scale
plot_RadialPlot(data = ExampleData.DeValues,
log.z = FALSE)
## now with output of the plot parameters
plot1 <- plot_RadialPlot(data = ExampleData.DeValues,
log.z = FALSE,
output = TRUE)
plot1
plot1$zlim
## now with adjusted z-scale limits
plot_RadialPlot(data = ExampleData.DeValues,
log.z = FALSE,
zlim = c(100, 200))
## now the two plots with serious but seasonally changing fun
#plot_RadialPlot(data = data.3, fun = TRUE)
## now with user-defined central value, in log-scale again
plot_RadialPlot(data = ExampleData.DeValues,
central.value = 150)
## now with legend, colour, different points and smaller scale
plot_RadialPlot(data = ExampleData.DeValues,
legend.text = "Sample 1",
col = "tomato4",
bar.col = "peachpuff",
pch = "R",
cex = 0.8)
## now without 2-sigma bar, y-axis, grid lines and central value line
plot_RadialPlot(data = ExampleData.DeValues,
bar.col = "none",
grid.col = "none",
y.ticks = FALSE,
lwd = 0)
## now with user-defined axes labels
plot_RadialPlot(data = ExampleData.DeValues,
xlab = c("Data error [%]",
"Data precision"),
ylab = "Scatter",
zlab = "Equivalent dose [Gy]")
## now with minimum, maximum and median value indicated
plot_RadialPlot(data = ExampleData.DeValues,
central.value = 150,
stats = c("min", "max", "median"))
## now with a brief statistical summary
plot_RadialPlot(data = ExampleData.DeValues,
summary = c("n", "in.ci"))
## now with another statistical summary as subheader
plot_RadialPlot(data = ExampleData.DeValues,
summary = c("mean.weighted", "median"),
summary.pos = "sub")
## now the data set is split into sub-groups, one is manipulated
data.1 <- ExampleData.DeValues[1:15,]
data.2 <- ExampleData.DeValues[16:25,] * 1.3
## now a common dataset is created from the two subgroups
data.3 <- list(data.1, data.2)
## now the two data sets are plotted in one plot
plot_RadialPlot(data = data.3)
## now with some graphical modification
plot_RadialPlot(data = data.3,
col = c("darkblue", "darkgreen"),
bar.col = c("lightblue", "lightgreen"),
pch = c(2, 6),
summary = c("n", "in.ci"),
summary.pos = "sub",
legend = c("Sample 1", "Sample 2"))
Run the code above in your browser using DataLab