I presume you are working on the notebook interface. You can do save('file.png') and it will show you the figure. You can also do save('/tmp/file.png') and it will not show you the figure since the figure is saved in a different path (provided you have write access to that path).