Some functions for bbplot!#3
Merged
juniperlsimonis merged 3 commits intodapperstats:mainfrom Jun 3, 2022
Merged
Conversation
Axis blank plus ribbon
Collaborator
|
oooo awesome! sorry i kept forgetting to cricle back to this! |
Contributor
Author
|
No worries Juniper! I'm thinking up a decent way to create a multi-plot figure as well (using outside margins). When I get a chance I'll make a PR for that! |
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.
Hey Juniper!
I kept forgetting to show you the functions I've added to bbplot that I've been finding useful. They mostly are wrapper functions. For example,
axis_blank()replacesaxis()andaxis_text()replacesmxtext(). There are a couple of quality of life improvements with the functions:For axis_blank():
minor), which defaults toTRUE. This will add minor tick marks evenly spaced between the major tick marks that are specified (half the length of the major tick marks). Likewise,tckhas been added as an argument so you can specify this (something we did anyways).at = NULL(the default), this function will useaxTicks()to generate the axis numbering.For axis_text():
This is for both numbering the tick marks on an axis and adding the axis title.
text = NULLandat = NULL, this will use axTicks() to determine what numbers to place (and where to place them) on the given axis.text = ''something"andat = NULL), then the function finds the middle of the axis and plots it there (though you still need to specifyline.The final function, which I spun up an issue for a long while ago, was to add a ribbon for 95% CI. It's a wrapper for the
polygon()function with a bunch of improvements. Here is a quick run through of how plotting would work:Which generates this figure: