assertion error with xkcd

This was using pdfpages (if that matters)

Traceback (most recent call last):
  File "./plot_stuff2.py", line 326, in <module>
    the_plot.finish (args, opt, time, res)
  File "./plot_stuff2.py", line 145, in finish
    self.pdf.savefig (self.fig)
  File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backends/backend_pdf.py", line 2297, in savefig
    figure.savefig(self, format='pdf', **kwargs)
  File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/figure.py",
line 1421, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backend_bases.py", line 2220, in print_figure
    **kwargs)
  File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backends/backend_pdf.py", line 2340, in print_pdf
    self.figure.draw(renderer)
  File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/figure.py",
line 1034, in draw
    func(*args)
  File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/text.py",
line 589, in draw
    self._fontproperties, angle)
  File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/patheffects.py", line 102, in draw_text
    self._draw_text_as_path(renderer, gc, x, y, s, prop, angle, ismath)
  File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/patheffects.py", line 112, in _draw_text_as_path
    ismath)
  File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backend_bases.py", line 526, in _get_text_path_transform
    path = Path(verts, codes)
  File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/path.py",
line 147, in __init__
    assert vertices.ndim == 2
AssertionError

Can you provide a code example to reproduce this. I suspect that recent work on path effects might be to blame here. Also, exactly which version of matplotlib and numpy were you using? The assert was placed there about a year ago IIRC to deal with a short-lived numpy bug.

Can you provide a standalone example to reproduce? The multipage_pdf.py example works fine with xkcd switched on.

Mike

···

On 10/23/2013 08:01 AM, Neal Becker wrote:

This was using pdfpages (if that matters)

Traceback (most recent call last):
   File "./plot_stuff2.py", line 326, in <module>
     the_plot.finish (args, opt, time, res)
   File "./plot_stuff2.py", line 145, in finish
     self.pdf.savefig (self.fig)
   File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backends/backend_pdf.py", line 2297, in savefig
     figure.savefig(self, format='pdf', **kwargs)
   File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/figure.py",
line 1421, in savefig
     self.canvas.print_figure(*args, **kwargs)
   File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backend_bases.py", line 2220, in print_figure
     **kwargs)
   File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backends/backend_pdf.py", line 2340, in print_pdf
     self.figure.draw(renderer)
   File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
     draw(artist, renderer, *args, **kwargs)
   File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/figure.py",
line 1034, in draw
     func(*args)
   File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
     draw(artist, renderer, *args, **kwargs)
   File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/text.py",
line 589, in draw
     self._fontproperties, angle)
   File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/patheffects.py", line 102, in draw_text
     self._draw_text_as_path(renderer, gc, x, y, s, prop, angle, ismath)
   File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/patheffects.py", line 112, in _draw_text_as_path
     ismath)
   File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backend_bases.py", line 526, in _get_text_path_transform
     path = Path(verts, codes)
   File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/path.py",
line 147, in __init__
     assert vertices.ndim == 2
AssertionError

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
                    _

\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
>>(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com