-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linewidth
of panel.border
and axis.line
not identical
#6057
Comments
Half of the panel border is cut off by clipping. library(ggplot2)
p <- ggplot(data = data.frame(x = 0, y = 0), aes(x = x, y = y)) +
geom_blank() +
theme_minimal() +
theme(
panel.border = element_rect(colour = "black", fill = NA, linewidth = 10),
axis.line = element_line(colour = "black", linewidth = 10),
axis.text = element_blank(),
axis.title = element_blank(),
panel.grid = element_blank()
)
p p + coord_cartesian(clip = "off") Created on 2024-08-25 with reprex v2.0.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I came across an inconsistency in the line thickness of the
panel.border
andaxis.line
. I am not sure if it is a bug or a user error, but I couldn't really make sense of it.If I set the line width with the
linewidth
argument the resulting lines are different even if the same value is supplied. The documentation ofelement_rect()
andelement_line()
says the unit should be"mm"
. I am not sure which of the two is correct.Help would be really appreciated! Thanks a lot in advance!
Created on 2024-08-25 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: