Simplified plotting code

Simplified the code for four-panel plots.