Save figures after plotting them