matplotlib: generating vector plot

前端 未结 4 493
一整个雨季
一整个雨季 2021-02-05 10:37

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\')
         


        
4条回答
  •  逝去的感伤
    2021-02-05 11:02

    I use the following code:

    from matplotlib import pyplot as plt
    
    fig, ax = plt.subplots() # or 
    fig.savefig('filename.eps', format='eps')
    

提交回复
热议问题