lifecycle::badge("experimental")
Creates a list of settings for plotting the column/row sums
in plot_confusion_matrix().
The `tc_` in the arguments refers to the total count tile.
NOTE: This is very experimental and will likely change.
sum_tile_settings(
palette = NULL,
label = NULL,
tile_fill = NULL,
font_color = NULL,
tile_border_color = NULL,
tile_border_size = NULL,
tile_border_linetype = NULL,
tc_tile_fill = NULL,
tc_font_color = NULL,
tc_tile_border_color = NULL,
tc_tile_border_size = NULL,
tc_tile_border_linetype = NULL,
intensity_by = NULL,
intensity_lims = NULL,
intensity_beyond_lims = NULL
)List of settings.
Color scheme to use for sum tiles.
Should be different from the `palette` used for the regular tiles.
Passed directly to `palette` in
ggplot2::scale_fill_distiller.
Try these palettes: "Greens", "Oranges", "Greys",
"Purples", "Reds", and "Blues".
Alternatively, pass a named list with limits of a custom gradient as e.g.
`list("low"="#e9e1fc", "high"="#BE94E6")`. These are passed to
ggplot2::scale_fill_gradient.
Note: When `tile_fill` is specified, the `palette` is ignored.
The label to use for the sum column and the sum row.
Specific background color for the tiles. Passed as `fill` to
ggplot2::geom_tile.
If specified, the `palette` is ignored.
Color of the text in the tiles with the column and row sums.
Color of the tile borders. Passed as `colour` to
ggplot2::geom_tile.
Size of the tile borders. Passed as `size` to
ggplot2::geom_tile.
Linetype for the tile borders. Passed as `linetype` to
ggplot2::geom_tile.
The measure that should control the color intensity of the tiles.
Either `counts`, `normalized`, `row_percentages`, `col_percentages`,
or one of `log counts`, `log2 counts`, `log10 counts`, `arcsinh counts`.
For `normalized`, `row_percentages`, and `col_percentages`, the color limits
become 0-100 (except when `intensity_lims` are specified),
why the intensities can better be compared across plots.
Note: When `add_sums=TRUE`, the `row_percentages` and `col_percentages`
options are only available for the main tiles. A separate intensity metric
must be specified for the sum tiles (e.g., via
`sums_settings = sum_tile_settings(intensity_by='normalized')`).
For the `log*` and `arcsinh` versions, the log/arcsinh transformed counts are used.
Note: In `log*` transformed counts, 0-counts are set to `0`, why they won't be distinguishable from 1-counts.
A specific range of values for the color intensity of
the tiles. Given as a numeric vector with c(min, max).
This allows having the same intensity scale across plots for better comparison of prediction sets.
What to do with values beyond the
`intensity_lims`. One of "truncate", "grey".
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
Other plotting functions:
font(),
plot_confusion_matrix(),
plot_metric_density(),
plot_probabilities(),
plot_probabilities_ecdf()