fix numeric xlevels specification in type_barplot#431
Merged
grantmcdermott merged 5 commits intomainfrom Jun 25, 2025
Merged
Conversation
…ation and examples, and add warning about incorrect specification
Collaborator
|
Thanks for the fix! Maybe insert a test like this: f = function() {
tinyplot(
~cyl,
data = mtcars,
type = "barplot",
beside = TRUE,
xlevels = levels(factor(mycars$cyl))[3:1]
)
}
expect_snapshot_plot(f, label = "barplot_xlevels_issue430") |
Collaborator
Author
|
Good suggestion, thanks, added now (but using an example that failed before the fix). |
Collaborator
Author
|
Similar improvements have now been done for |
Collaborator
|
I looked at the code and it seems great to me. I think we can merge. |
Collaborator
Author
|
Great, thanks for the feedback, this is very helpful. Should we wait for feedback from the original poster? |
Collaborator
|
I'm usually too impatient for that, but maybe it's a good idea :) |
Collaborator
Author
|
OK, I will let her know when the dev version is on R-universe. |
Owner
|
Thanks all, LGTM. |
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.
Fixes #430
xlevelsspecifications intype_barplot()never worked correctly because thexrather thandatapoints$xwas used in one place. Fixed now.xlevelsand added two simple examples.xlevelscontains entries that do not correspond to any level ofx.