restor graphical settings after plotting jpg