View source: R/model_rating_table_plot.R
| autoplot.rating_table | R Documentation |
rating_table() resultsCreate a ggplot visualisation of a rating_table object produced by
rating_table(). Estimates are plotted per risk factor, with optional
exposure bars. Observed portfolio experience can be added first with
add_portfolio_experience().
When observed experience is attached, it is plotted as an additional line.
The scaling is controlled by add_portfolio_experience().
## S3 method for class 'rating_table'
autoplot(
object,
risk_factors = NULL,
metric = NULL,
ncol = 1,
show_exposure_labels = TRUE,
decimal_mark = ",",
y_label = "Relativity",
bar_fill = NULL,
model_color = NULL,
use_linetype = FALSE,
rotate_angle = NULL,
custom_theme = NULL,
remove_underscores = FALSE,
labels = NULL,
dec.mark = NULL,
ylab = NULL,
fill = NULL,
color = NULL,
linetype = NULL,
...
)
object |
A |
risk_factors |
Character vector specifying which risk factors to plot. Defaults to all risk factors. |
metric |
Optional character string. Observed-experience metric to plot
when observed experience has been attached with
|
ncol |
Number of columns in the patchwork layout. Default is 1. |
show_exposure_labels |
Logical; if |
decimal_mark |
Character; decimal separator, either |
y_label |
Character; label for the y-axis. Default is |
bar_fill |
Fill color for the exposure bars. If |
model_color |
Optional override for model line colors. If |
use_linetype |
Logical; if |
rotate_angle |
Numeric value for angle of labels on the x-axis (degrees). |
custom_theme |
List with customised theme options. |
remove_underscores |
Logical; remove underscores from labels. |
labels |
Deprecated alias for |
dec.mark |
Deprecated alias for |
ylab |
Deprecated alias for |
fill |
Deprecated alias for |
color |
Deprecated alias for |
linetype |
Deprecated alias for |
... |
Additional arguments passed to ggplot2 layers. |
A ggplot/patchwork object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.