The following example demonstrates an issue with the PDF output when setting rasterized=True:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
z = np.random.random((100000, 3, 2))
lc = LineCollection(z, rasterized=True, alpha=0.01, color='k')
ax.add_collection(lc)
fig.savefig('test.png')
fig.savefig('test.pdf')
The PNG output is:

The PDF output (converted to PNG, looks the same), is:

For some reason, the PDF output appears gray not black in the center.
The following example demonstrates an issue with the PDF output when setting
rasterized=True:The PNG output is:
The PDF output (converted to PNG, looks the same), is:
For some reason, the PDF output appears gray not black in the center.