generates dynamic plots