unmark1 unmark1 - 3 months ago 15
R Question

Is it possible to suppress label cowplot package R

I was wondering if it is possible to suppress the axis label at (x - top: "mpg") and (y - right: "wt") using the package cowplot.

library(ggplot2); library(cowplot)
plot_a <- ggplot(mtcars, aes(mpg,wt)) + geom_point()
ggdraw(switch_axis_position(plot_a, axis = 'xy',keep = 'xy'))


enter image description here


See here: https://rdrr.io/cran/cowplot/man/panel_border.html

Substitute your ggdraw line for: plot+panel_border(colour="black", size=0.5, linetype=1,remove=FALSE)