Created plots functions for fig6