The problem with pcolor is that it draws all the pixels as polygons,  
which is very inefficient in terms of file size. For example,

import matplotlib
matplotlib.use('PS')
from matplotlib.pyplot import *

import numpy as np

image = np.random.random((100,100))

fig = figure(figsize=(4,4))
ax = fig.add_subplot(111)
ax.pcolor(image)
fig.savefig('plot.ps')

produces a 2Mb+ file.

Thanks,

Thomas



On Mar 31, 2009, at 4:32 PM, John Hunter wrote:

> On Tue, Mar 31, 2009 at 2:56 PM, Thomas Robitaille
> <thomas.robitai...@gmail.com> wrote:
>> Hello,
>>
>> I am using matplotlib to create postscript and SVG files. I am
>> currently using imshow to show the contents of an array, but this
>> means that when saving vector graphics files, matplotlib resamples  
>> the
>> image/array onto a finer grid. What I would like, is for code such as
>> this:
>
>
> I believe pcolor will be closer to what you are looking for.7
>
> JDH


------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to