In shell/commands.py, save mehod. A PdfPlotGraphicsContext instance is used to save to pdf, and the same object is used in the code to save to png/bmp/jpg (can be used to save to png/bmp/jpg at all?), however in that case the instance is not created because that's done in if ext == ".pdf". Therefore a save('chacoplot.png') will result in a UnboundLocalError: local variable 'gc' referenced before assignment.
In shell/commands.py, save mehod. A PdfPlotGraphicsContext instance is used to save to pdf, and the same object is used in the code to save to png/bmp/jpg (can be used to save to png/bmp/jpg at all?), however in that case the instance is not created because that's done in if ext == ".pdf". Therefore a save('chacoplot.png') will result in a UnboundLocalError: local variable 'gc' referenced before assignment.