|
408 | 408 | state <- .irtIRTState(dataset, options, jaspResults) |
409 | 409 | } |
410 | 410 | plotdata <- state[["plotDataTestInformation"]] |
411 | | - xBreaks <- jaspGraphs::getPrettyAxisBreaks(c(-6, 6), min.n = 4) |
412 | | - yBreaks <- jaspGraphs::getPrettyAxisBreaks(c(0, subset(plotdata$y, plotdata$x >= -6 & plotdata$x <= 6)), min.n = 4) |
| 411 | + xBreaks <- jaspGraphs::getPrettyAxisBreaks(c(-3, 3), min.n = 4) |
| 412 | + yBreaks <- jaspGraphs::getPrettyAxisBreaks(c(0, subset(plotdata$y, plotdata$x >= -3 & plotdata$x <= 3)), min.n = 4) |
413 | 413 | p <- ggplot2::ggplot(data = plotdata, mapping = ggplot2::aes(x = x, y = y, color = type)) + |
414 | 414 | ggplot2::geom_line() + |
415 | 415 | ggplot2::scale_x_continuous(name = "\u03B8", breaks = xBreaks, limits = range(xBreaks)) + |
|
444 | 444 | } |
445 | 445 | plotdata <- state[["plotDataItemInformation"]] |
446 | 446 | plotdata <- subset(plotdata, plotdata$item %in% match(options[["plotItemInformationItems"]], options[["items"]])) |
447 | | - xBreaks <- jaspGraphs::getPrettyAxisBreaks(c(-6, 6), min.n = 4) |
448 | | - yBreaks <- jaspGraphs::getPrettyAxisBreaks(c(0, subset(plotdata$y, plotdata$x >= -6 & plotdata$x <= 6)), min.n = 4) |
| 447 | + xBreaks <- jaspGraphs::getPrettyAxisBreaks(c(-3, 3), min.n = 4) |
| 448 | + yBreaks <- jaspGraphs::getPrettyAxisBreaks(c(0, subset(plotdata$y, plotdata$x >= -3 & plotdata$x <= 3)), min.n = 4) |
449 | 449 | colors <- colorspace::qualitative_hcl(length(options[["plotItemInformationItems"]])) |
450 | 450 | p <- ggplot2::ggplot(data = plotdata, mapping = ggplot2::aes(x = x, y = y, col = factor(item))) + |
451 | 451 | ggplot2::geom_line() + |
|
482 | 482 | object <- createJaspContainer(title = gettext("Item Characteristic Curves")) |
483 | 483 | } |
484 | 484 | object$position <- position + 1 |
485 | | - object$dependOn(options = c(.irtCommonDeps(type = "irt"), "plotItemCharacteristicItems", "plotItemCharacteristicLabels")) |
| 485 | + object$dependOn(options = c(.irtCommonDeps(type = "irt"), "plotItemCharacteristicItems", "plotItemCharacteristicLabels", "plotItemCharacteristicFromX", "plotItemCharacteristicToX")) |
486 | 486 | jaspResults[["plotItemCharacteristic"]] <- object |
487 | 487 | if (!ready) { |
488 | 488 | return() |
|
492 | 492 | } else { |
493 | 493 | state <- .irtIRTState(dataset, options, jaspResults) |
494 | 494 | } |
495 | | - xBreaks <- jaspGraphs::getPrettyAxisBreaks(c(-6, 6), min.n = 4) |
| 495 | + xBreaks <- jaspGraphs::getPrettyAxisBreaks(c(options[["plotItemCharacteristicFromX"]], options[["plotItemCharacteristicToX"]]), min.n = 4) |
496 | 496 | if (options[["plotItemCharacteristicGroup"]]) { |
497 | 497 | plotdata <- state[["plotDataItemCharacteristic"]] |
498 | 498 | plotdata <- subset(plotdata, plotdata$item %in% match(options[["plotItemCharacteristicItems"]], options[["items"]])) |
|
0 commit comments