Updated the code for better plot layout and efficient calculations