From 6359eda07a5fe8560da5b9008e1e0d56ec09097a Mon Sep 17 00:00:00 2001 From: JTPetter <61797391+JTPetter@users.noreply.github.com> Date: Tue, 5 Dec 2023 10:09:46 -0500 Subject: [PATCH] Fix issue 2506 (#294) --- R/processCapabilityStudies.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/processCapabilityStudies.R b/R/processCapabilityStudies.R index 57e03aeb..7c70de7f 100644 --- a/R/processCapabilityStudies.R +++ b/R/processCapabilityStudies.R @@ -170,8 +170,8 @@ processCapabilityStudies <- function(jaspResults, dataset, options) { if (ready && is.null(jaspResults[["xmr"]][["plot"]])) { jaspResults[["xmr"]][["plot"]] <- createJaspPlot(title = gettext("X-mR Control Chart"), width = 1200, height = 500) individualChart <- .controlChart(dataset = dataset[measurements], plotType = "I", - xAxisLabels = axisLabels) - mrChart <- .controlChart(dataset = dataset[measurements], plotType = "MR", xAxisLabels = axisLabels, + xAxisLabels = seq_along(unlist(dataset[measurements]))) + mrChart <- .controlChart(dataset = dataset[measurements], plotType = "MR", xAxisLabels = seq_along(unlist(dataset[measurements])), movingRangeLength = options[["xmrChartMovingRangeLength"]]) jaspResults[["xmr"]][["plot"]]$plotObject <- jaspGraphs::ggMatrixPlot(plotList = list(mrChart$plotObject, individualChart$plotObject), layout = matrix(2:1, 2), removeXYlabels= "x") @@ -1551,9 +1551,9 @@ processCapabilityStudies <- function(jaspResults, dataset, options) { } else if (options[["controlChartType"]] == "xmr"){ indexCounter <- indexCounter + 1 plotList[[indexCounter]] <- .controlChart(dataset = dataset[measurements], plotType = "I", - xAxisLabels = axisLabels)$plotObject + xAxisLabels = seq_along(unlist(dataset[measurements])))$plotObject indexCounter <- indexCounter + 1 - plotList[[indexCounter]] <- .controlChart(dataset = dataset[measurements], plotType = "MR", xAxisLabels = axisLabels, + plotList[[indexCounter]] <- .controlChart(dataset = dataset[measurements], plotType = "MR", xAxisLabels = seq_along(unlist(dataset[measurements])), movingRangeLength = options[["xmrChartMovingRangeLength"]])$plotObject } }