You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a minor inconsistency, but in case this wasn't noticed yet, here it is. Apparently, guide_colourbar() uses the ticks.linewidth and frame.linewidth parameter as-is, while in the rest of ggplot2 (as far as I can tell), almost every parameter for linewidth is calculated as below:
# Right before handing `supplied_value` to grid
lwd = supplied_value * .pt
Here is a reprex with exaggerated line sizes. You can notice when comparing the width of geom_line() versus the colourbar guide ticks. The lines appear of the same width when you adjust ticks.linewidth = 5 * .pt.
That indeed would be a fairer comparison, though also the theme elements appear to use the * .pt. Seen in the code of element_grob.element_line() here:
Activity
clauswilke commentedon Jan 12, 2021
The correct comparison is with theme elements. I believe they don't multiply by
.pt, but I could misremember.teunbrand commentedon Jan 12, 2021
That indeed would be a fairer comparison, though also the theme elements appear to use the
* .pt. Seen in the code ofelement_grob.element_line()here:ggplot2/R/theme-elements.r
Lines 248 to 256 in 37eb64d
clauswilke commentedon Jan 12, 2021
Then it probably should do so in the color bar also.
teunbrand commentedon Jan 16, 2021
Thanks so I thought as well. Should I leave a PR for you to consider?
clauswilke commentedon Jan 16, 2021
Yes, please go ahead.
Multiply colourbar linewidth parameters with *.pt (#4314) (#4318)