Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ where the formatting is also better._
i.e. cases where `las = 2` or `las = 3`. (#369 @grantmcdermott)
- Better integration with the Positron IDE graphics pane. Thanks to @thomasp85
for the report and helpful suggestions. (#377 @grantmcdermott)
- Fixed a bug that resulted in y-axis labels being coerced to numeric for
`"p"`-alike plot types (including `"jitter"`) if `y` is a factor or character
(#387 @grantmcdermott).

### Internals:

Expand Down
2 changes: 1 addition & 1 deletion R/facet.R
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ draw_facet_window = function(
lty = get_tpar(c("lty.yaxs", "lty.axis"), 1)
)
type_range_x = type %in% c("barplot", "pointrange", "errorbar", "ribbon", "boxplot", "p", "violin") && !is.null(xlabs)
type_range_y = isTRUE(flip) && type %in% c("barplot", "pointrange", "errorbar", "ribbon", "boxplot", "p", "violin") && !is.null(ylabs)
type_range_y = !is.null(ylabs) && (type == "p" || (isTRUE(flip) && type %in% c("barplot", "pointrange", "errorbar", "ribbon", "boxplot", "violin")))
if (type_range_x) {
args_x = modifyList(args_x, list(at = xlabs, labels = names(xlabs)))
}
Expand Down
201 changes: 201 additions & 0 deletions inst/tinytest/_tinysnapshot/type_j_y.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions inst/tinytest/test-misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ f = function() {
}
expect_snapshot_plot(f, label = "type_j")

f = function() {
set.seed(42)
tinyplot(Species ~ Sepal.Length, data = iris, type = "j")
}
expect_snapshot_plot(f, label = "type_j_y")

# log axes
f = function() {
Expand Down