Dark mode ggplot2 therme white stripes

Hello everyone,

It is rather a petty question, but I try to make a dark theme plot with the following script and the "plot" vector I have produced with ggplot2.

Unfortunately there are these two white stripes on right and left of the y-axis.
Would anyone know what they could be? I spent hours trying to find the right command to fill them black!

plot + theme(
legend.background = element_rect(colour = "black", fill = "black"),
plot.background = element_rect(fill = "black") ,
legend.text= element_text(colour = "white" ) ,
legend.title= element_text(colour = "black" ) ,
axis.text.x= element_text(colour = "black" ) ,
axis.title.y= element_text(colour = "black" ) ,
panel.background= element_rect(fill = "black") ,
legend.box.background= element_rect(fill = "black") ,
line=element_line(colour = "black"),
rec=element_rect(fill = "black"),
title=element_text(colour = "white" ),
)

try with

 panel.grid = element_line(colour="black"),
1 Like

It was indeed what was missing nirgrahamuk.
Thank you for the help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.