unmark1 unmark1 - 1 year ago 76
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

Answer Source

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)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download