Code for plotting variables