From 3c13018c968fda98c7b61a36cd1eb50dbf7ebf31 Mon Sep 17 00:00:00 2001 From: asardaes Date: Sat, 22 Jun 2024 22:41:02 +0200 Subject: [PATCH] Use linewidth instead of size for geom_line --- R/S4-TSClusters-methods.R | 6 +++--- man/tsclusters-methods.Rd | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/R/S4-TSClusters-methods.R b/R/S4-TSClusters-methods.R index c9c82203..8fa4b4e0 100644 --- a/R/S4-TSClusters-methods.R +++ b/R/S4-TSClusters-methods.R @@ -502,8 +502,8 @@ setMethod("predict", methods::signature(object = "TSClusters"), predict.TSCluste #' via the ellipsis (`...`). #' #' Otherwise, the function plots the time series of each cluster along with the obtained centroid. -#' The default values for cluster centroids are: `linetype = "dashed"`, `size = 1.5`, `colour = -#' "black"`, `alpha = 0.5`. You can change this by means of the ellipsis (`...`). +#' The default values for cluster centroids are: `linetype = "dashed"`, `linewidth = 1.5`, +#' `colour = "black"`, `alpha = 0.5`. You can change this by means of the ellipsis (`...`). #' #' You can choose what to plot with the `type` parameter. Possible options are: #' @@ -673,7 +673,7 @@ plot.TSClusters <- function(x, y, ..., if (length(list(...)) == 0L) gg <- gg + ggplot2::geom_line(data = dfcm[dfcm$cl %in% clus, ], linetype = "dashed", - size = 1.5, + linewidth = 1.5, colour = "black", alpha = 0.5) else diff --git a/man/tsclusters-methods.Rd b/man/tsclusters-methods.Rd index a52762d3..ad3fd362 100644 --- a/man/tsclusters-methods.Rd +++ b/man/tsclusters-methods.Rd @@ -158,7 +158,8 @@ dendrogram is plotted by default; you can pass any extra parameters to \code{\li via the ellipsis (\code{...}). Otherwise, the function plots the time series of each cluster along with the obtained centroid. -The default values for cluster centroids are: \code{linetype = "dashed"}, \code{size = 1.5}, \code{colour = "black"}, \code{alpha = 0.5}. You can change this by means of the ellipsis (\code{...}). +The default values for cluster centroids are: \code{linetype = "dashed"}, \code{linewidth = 1.5}, +\code{colour = "black"}, \code{alpha = 0.5}. You can change this by means of the ellipsis (\code{...}). You can choose what to plot with the \code{type} parameter. Possible options are: \itemize{