Closed
Description
I was tring to plot a lot of data with errors using errobar of matplotlib. The eps or pdf file is very large, much larger than created by IDL. I have tried to use rasterized=True, but it does not work. If I only use plt.plot(x,y) to plot the data without errors, it can create a much smaller file. I am using OSX 10.9 and Anaconda. Here is the example of my code
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(0)
x = np.linspace(-5., 5., 5000)
y = 3 * np.exp(-0.5 * (x - 1.3)2 / 0.82)
y += np.random.normal(0., 0.2, x.shape)
f = plt.figure(0)
plt.errorbar(x,y, yerr=0.2,fmt='')
f.savefig('test.pdf')
Metadata
Metadata
Assignees
Labels
No labels