I am trying to draw a nice matrix with some columns highlighted. I am very happy with the result of the code below.
import matplotlib.pyplot as plt
import numpy as np
plt.pcolormesh(np.random.rand(10,10), cmap = 'Greys')
plt.axvspan(3,6, color = 'red', alpha = 0.2)
plt.show()
which gives an image, saved to .png, that looks something like
https://i.stack.imgur.com/bmQSw.jpg
this. The problem is that if I save the image as eps, the image becomes much worse, looking like
https://dl.dropboxusercontent.com/u/8162527/figure_1.eps
this. As you can imagine, the second variant is not an option for me.
I tried converting the nice png image to eps, and it sort of works. The problem is the resulting image is not scalable and is 100 times larger (in file size) than the original. I am desperate for ideas.