I want to generate a vector plot with matplotlib. I tried hard - but the output is a raster image. Here's what I use:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
and finally:
myfig.savefig('myfig.eps', format='eps')
I've found that export to ps
gives a vector image, but the problem with eps
remains.
I use the following code:
from matplotlib import pyplot as plt
fig, ax = plt.subplots() # or
fig.savefig('filename.eps', format='eps')