There can be two reasons that you are not able to see the bar plot.
Your viewer window is too small for it to contain the graph. In that case just drag the viewer window on the right corner of your RStudio and make it big enough for it to incorporate your graph.
The next may be due to data. It maybe that your data is too big so machine is not bale to assign margins for the data automatically.
You will have to re-assign margin parameters.
Before that, you can check margin using par("mar")
.
You should get :
5.1 4.1 4.1 2.1
You can use par(mar=c(1,1,1,1)) and invoke dev.off() to make R open your plot in a separate window.
You code will look something like this:
par(mar=c(1,1,1,1))
pdf('filename.pdf')
barplot(tab_orig, main="Graph title",xlab="X-axis legend", ylab="Y-axis legend", pch=20, cex=2)
dev.off()
Here, par: sets or adjusts plotting parameters.
mar: A numeric vector of length 4, which sets the margin sizes in the following order: bottom, left, top, and right.