0

I am trying to add a panel border to my plot - but the border keeps falling somewhere below the x-axis. Does anyone have any suggestions to have the bottom line of the panel border fall directly on the x-axis.

f<- ggplot(nadph, aes(x = reorder(DGRP.Line, MEN), y = MEN)) +
geom_bar(stat = "identity") +
xlab("DGRP Line") + ylab ("MEN activity (standardized)") +
theme(axis.text.x=element_blank(),
    panel.background = element_blank(),
    panel.grid.major = element_blank(),
    panel.grid.minor = element_blank(),
    axis.ticks.x = element_blank(),
    panel.border = element_rect(color = "black", fill= NA, size=1))
  • 2
    Please see [here](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for some examples of how to include a reproducible example in a question. That will help others help you. – aosmith Nov 29 '16 at 18:47
  • 2
    If you're trying to remove the space between the x axis and the bottom of the plot, see the answer [here](http://stackoverflow.com/questions/22945651/how-to-remove-space-between-axis-area-plot-in-ggplot2). You may be interested in only removing that space and not the space on the top of the plot, in which case see the answers [here](http://stackoverflow.com/questions/20220424/ggplot2-bar-plot-no-space-between-bottom-of-geom-and-x-axis-keep-space-above) – aosmith Nov 29 '16 at 18:49

0 Answers0