[jaspQualityControl] Fix legend text cutoff and expand abbreviated x-axis labels in...#435
Draft
sisyphus-jasp wants to merge 1 commit intojasp-stats:masterfrom
Draft
Conversation
…axis labels in...
|
Might be correct but getting figure sizing and labels correct is difficult. Not sure whether it should be tested or just closed. Also note change in capitalization. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes: jasp-stats/jasp-issues#4004
Fix Gauge R&R Components of Variation Plot
What was wrong
The Components of Variation plot in the Gauge R&R analysis had two issues:
What was changed
1. Expanded x-axis labels (R/msaGaugeRR.R, line 907)
Changed from:
To:
2. Increased plot width (R/msaGaugeRR.R, lines 690 and 697)
Changed from:
To:
Why tests fail
The 53 test failures in msaGaugeRR are expected snapshot mismatches because:
The snapshots in
tests/testthat/_snaps/msaGaugeRR/need to be regenerated to reflect the new expected output. This is the correct and expected behavior when making visual changes to plots.Verification
The fix was verified by running the analysis and checking the x-axis labels:
The labels are now correctly expanded to their full forms.
Implementation Plan
Fix Gauge R&R Components of Variation Plot
Root Cause
The
.gaugeVarCompGraphfunction in/workspace/R/msaGaugeRR.Ruses abbreviated x-axis labels:The legend text cutoff is likely caused by the plot width (850px) being too narrow to accommodate the legend on the right side.
Proposed Changes
1. Fix X-axis Labels (line 907 in msaGaugeRR.R)
Change from:
To:
2. Fix Legend Text Cutoff
Increase plot width from 850 to 950 in two locations:
createJaspPlot(title = gettext("Components of variation"), width = 950, height = 500)createJaspPlot(title = gettext("Components of variation"), width = 950, height = 500)This gives more room for the legend on the right side.
Expected Test Impact
The function
.gaugeVarCompGraphis also used inmsaGaugeRRnonrep.R(line 393), so this fix will apply to both analyses.Fix legend text cutoff and expand abbreviated x-axis labels in Gauge R&R Components of Variation plot
Screenshot Analysis
screenshot-1.png:
The image provided is a bar chart, but it does not appear to be a screenshot from JASP statistical software. Instead, it seems to be a standalone chart, likely created using a different tool or exported from a statistical analysis. Below is a detailed description of the chart:
Description of the Image:
Chart Type:
Axes:
Legend:
Bars:
Observations:
Notes:
Relation to JASP:
Conclusion:
The image is a standalone stacked bar chart showing the contribution and study variation for different sources of variability (Gauge r&R, Repeat, Reprod, Part-to-part). It does not contain any JASP-specific UI elements or error messages. If this chart is related to a JASP bug report, additional context from the JASP interface would be needed to provide a more detailed description of the issue.
screenshot-2.png:
The image provided is a bar chart, not a screenshot from JASP statistical software. It appears to be a graphical representation of the components of variation in a Gauge Repeatability and Reproducibility (Gauge R&R) study. Below is a detailed description of the chart:
Description of the Image:
Title and Labels:
Bar Chart Details:
Total Gauge R&R:
Repeatability:
Reproducibility:
Part-to-Part:
Observations:
Relevance to JASP:
The image does not appear to be directly related to JASP statistical software. It is a standalone chart that could have been generated using various statistical tools or software (e.g., Minitab, Excel, or other statistical packages). If this chart is part of a JASP bug report, it might be included to illustrate the expected output or to compare with the output generated by JASP.
If this were a JASP Screenshot:
If this were a JASP screenshot, we would expect to see:
Since this is not a JASP screenshot, the image does not provide any information about JASP-specific modules, analyses, or errors. If you have additional context or a different screenshot related to JASP, please provide it for further analysis.
Test Results
Automated Code Review
Approved after 1 review iteration(s).