Create set plots or an alternative histogram or barplot with R

To create a stem plot, barplot (with filled bars), or a histogram, there is a simple method in R which provides a flexible alternative to the full blown barplot and histogram plots. It’s even easier when it comes to composing multiple graphs in one plot.

Simply use the type h to create a stem plot:

plot( type='h', ... )

In case you want to have a barplot or histogram it’s wise to use square line endings and change the line width (requires tweaking):

plot( type='h', lend=2, lwd=30 )

That’s it
iss