Stack Exchange
How to recreate this plot in ggplot2?
Here is my data and original plot:
z <- dbinom(0:6, size=6, p=0.512)
names(z) <- as.character(0:6)
barplot(z, space=0, ylab="Probability", col = "firebrick", las = 1, xlab = "Number of boys")

I need to recreate this same plot in ggplot2 but I'm struggling to make it look remotely similar. Any help would be appreciated.

Building on your code:
library(ggplot2)
ggplot(data.frame(z = z, num_boys = names(z)), aes(x = num_boys, y = z)) +
        geom_bar(stat = "identity", fill = "firebrick", col = "black", width = 1) +
        labs(y = "Probability", x = "Number of boys") +
        ggthemes::theme_base()


NOTE: I used ggthemes::theme_base() to make the plot look like the base plot your original code produces.

If you want to add some customization of axis and background :
z=as.data.frame(z)
colnames(z)=c("Probability")
z$`Number of boys`=rownames(z)
my_theme= list(theme_bw(),
               theme(panel.border=element_blank(), 
                     panel.grid.major=element_blank(),
                     panel.grid.minor=element_blank(),axis.ticks.x = element_blank(),axis.line.x=element_blank()))
ggplot(z, aes(`Number of boys`,Probability)) +              
  geom_bar(stat = "identity",width = 1,color="black",fill="firebrick")+
  my_theme +
  annotate(x=0,xend=0,y=0, yend=0.4, colour="black", lwd=0.75, geom="segment")


