I am using matplotlib to produce a plot which I then save to a PNG file using matplotlib.pyplot.savefig.
It all works fine, but the filesize is quite large (about 120Kb).
I can use ImageMagik afterwards (via the shell) to reduce the filesize to 38Kb without any loss of quality by reducing the number of colors and turning off dither:
convert +dither -colors 256 orig.png new.png
My question is: can I do this within matplotlib? I have searched the documentation and can't find any thing pertaining to setting the number of colors used when saving, etc....
Thanks!