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
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ where the formatting is also better._

## Development version

### Aesthetic changes

- The legend plot characters for the `"pointrange"` and `"errorbar"` types now
include a line, to better resemble the actual plot elements (#532 @grantmcdermott)

### Internals

- We now encourage type-specific legend customizations within the individual
Expand Down
4 changes: 3 additions & 1 deletion R/type_pointrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ draw_pointrange = function() {

data_pointrange = function(dodge, fixed.dodge) {
fun = function(settings, ...) {
env2env(settings, environment(), c("datapoints", "xlabs", "cex"))
env2env(settings, environment(), c("datapoints", "xlabs", "cex", "lty", "lwd"))

if (is.character(datapoints$x)) {
datapoints$x = as.factor(datapoints$x)
Expand All @@ -74,6 +74,8 @@ data_pointrange = function(dodge, fixed.dodge) {

# legend customizations
settings$legend_args[["pt.cex"]] = settings$legend_args[["pt.cex"]] %||% (cex %||% par("cex"))
settings$legend_args[["lty"]] = settings$legend_args[["lty"]] %||% (lty %||% par("lty"))
settings$legend_args[["lwd"]] = settings$legend_args[["lwd"]] %||% (lwd %||% par("lwd"))

env2env(environment(), settings, c(
"x",
Expand Down
153 changes: 78 additions & 75 deletions inst/tinytest/_tinysnapshot/dodge_errorbar_add_lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
159 changes: 81 additions & 78 deletions inst/tinytest/_tinysnapshot/dodge_errorbar_add_ribbon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 57 additions & 54 deletions inst/tinytest/_tinysnapshot/dodge_pointrange.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading