Fix:theme_blank plot margin#15
Merged
hurry060215-tech merged 7 commits intoJun 8, 2026
Merged
Conversation
f3d0c9d to
f48e192
Compare
Collaborator
Author
|
已重新整理 \ heme_blank()\ 的画布和坐标标注布局,最新提交 \6317e85\ 已推送到 PR 分支。主要调整:plot margin 提高到 \lab_size + 10\;x 轴标注放到 x 轴箭头右下侧;y 轴标注放到 y 轴箭头左上侧,避免原点附近重叠和裁剪。已跑 \devtools::test(stop_on_failure=TRUE)\,结果 PASS 1 / FAIL 0。 |
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
theme_blank()plot margin fromlab_size + 2tolab_size + 10on all sides.Why
theme_blank()draws coordinate arrows and axis labels outside the panel withcoord_cartesian(clip = off). The previous default margin was too small for plots such asCellDimPlot(..., theme_use = theme_blank), so the coordinate annotation could be clipped at the canvas edge. The labels were also anchored at the coordinate origin, which made them visually touch the axes.Validation
git diff --checksuccessfully.devtools::test(stop_on_failure = TRUE)successfully: PASS 1 / FAIL 0.Standardpca_1,Standardpca_2) to visually check the annotation placement.