Added function for initializing plots