Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue983 axis qcplot edits vincent #986

Merged
merged 13 commits into from
Dec 13, 2023

Conversation

vincentvanhees
Copy link
Member

@vincentvanhees vincentvanhees commented Dec 5, 2023

@jhmigueles In this PR I propose a couple of edits to PR #985

  • Renaming of object names to improve readability
  • Fixed day numbering, which missed the first incomplete calendar day. This is now accounted for.
  • Your change to argument mar caused y axis to overlap for devices with temperature data.
  • I replaced d1, d2, d3, etc by a single axis label "recording day" and then all the numbers at the axis.
  • I changed x-axis font to 1 to be in line with y-axis, similarly the hash area for study protocol, and accelerometer signal has thinner lines now. I do this as pdf files tend to be smaller with thinner lines, which becomes an issue if the user creates thousands of plots like these. Also, I am trying to avoid inconsistent line width when there is no functional value of the differences.
  • minor edits to legend to clarify that by 'study protocol' we refer to the masking of time. I had to keep it short as there is limited space.
  • Replaced repeated calculation of day length, which by the way also was problematic as you were calculating this on a vector with possible length of one if recording has only one noon or midnight. Further, this number would be incorrect if there is a day in the recording with 25 hours.
  • UPDATE: Now horizontal axis simplified as vertical grid already clarifies when noon occurs, so no need for ticks

Example 1:

image

Example 2:

image

Checklist before merging:

  • Existing tests still work (check by running the test suite, e.g. from RStudio).
  • Added tests (if you added functionality) or fixed existing test (if you fixed a bug).
  • Updated or expanded the documentation.
  • Updated release notes in inst/NEWS.Rd with a user-readable summary. Please, include references to relevant issues or PR discussions.
  • Added your name to the contributors lists in the DESCRIPTION file, if you think you made a significant contribution.

@vincentvanhees vincentvanhees marked this pull request as ready for review December 5, 2023 16:17
@vincentvanhees
Copy link
Member Author

Actually, I think the double axis does not serve any purpose because the vertical lines already clarify when noon and midnight is. I will now make an extra commit to remove the double axis such that we only have one axis to indicate the midnights

@vincentvanhees
Copy link
Member Author

I just made a few minor edits. The grid lines now cover all plots and the legend is more clearly positioned on top. To illustrate how it looks like with all masking types I simulated some clipping in the example I show above, which now looks:

image

Copy link
Collaborator

@jhmigueles jhmigueles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a couple of minor comments to make the y axis labels always perpendicular to the axis in all plots (ACC, temperature, and nonwear score). No further comments beyond that. Thanks!

NEWS.md Outdated Show resolved Hide resolved
R/g.plot.R Outdated Show resolved Hide resolved
R/g.plot.R Outdated Show resolved Hide resolved
@vincentvanhees vincentvanhees merged commit 8970c07 into issue983_xaxisQCplot Dec 13, 2023
2 checks passed
@vincentvanhees vincentvanhees deleted the issue983_axis_qcplot_editsVincent branch December 13, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants