On Tue, May 5, 2009 at 1:08 PM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:

> Any comment or suggestion will be welcomed.
> I'm planning to commit this change to the svn soon, unless others come
> up with some issues.

I am getting the following error when I test on svn HEAD

jo...@flag:misc> python rasterization_demo.py
Traceback (most recent call last):
  File "rasterization_demo.py", line 49, in ?
    plt.savefig("test_reasterization.eps", dpi=150)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyplot.py",
line 354, in savefig
    return fig.savefig(*args, **kwargs)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py",
line 1002, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backend_bases.py",
line 1467, in print_figure
    bbox_inches_restore=_bbox_inches_restore,
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backend_bases.py",
line 1321, in print_eps
    return ps.print_eps(*args, **kwargs)
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
line 847, in print_eps
    return self._print_ps(outfile, 'eps', *args, **kwargs)
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
line 879, in _print_ps
    orientation, isLandscape, papertype,
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
line 996, in _print_figure
    Ndict += len(renderer.used_characters)
AttributeError: 'MixedModeRenderer' object has no attribute 'used_characters'


Also, a minor potential buglet.  In the following,

+        if dsu[0][0] < rasterization_zorder:
+            renderer.start_rasterizing()
+            dsu_rasterized = [l for l in dsu if l[0] < rasterization_zorder]
+            dsu = [l for l in dsu if l[0] >= rasterization_zorder]
+        else:
+            dsu_rasterized = []

I think one could construct a sufficiently empty axes that len(dsu)==0
so I suggest

+        if len(dsu) and dsu[0][0] < rasterization_zorder:

It might also be worthwhile employing a consistent usage when wrapping
the draw methods.  We have

+    @allow_rasterization
     def draw(self, renderer, *args, **kwargs):

+    @martist.allow_rasterization
     def draw(self, renderer):

and

+    @artist.allow_rasterization
     def draw(self, renderer):

If we take the time upfront to be consistent, any search replace
things we need to do later will be easier.

Thanks,
JDH

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to