I save plots with ggplot as .png. The background has to be black, but there is allways a small white margin (only top, down an left; not right).
How can I remove th
The line you are seeing is the default outline colour of the plot.background rectangle element. You can remove it by setting colour to NA in your theme() call:
plot.background
theme()
theme(plot.background=element_rect(fill="black", colour=NA))