Fixing the code for the plots
Some edits