nschloe/matplotlib2tikz — pull request #41 by Caasar (2014-04-23 10:36:38+00:00)
Title: Extended matplotlib2tikz to support QuadMesh and LineCollection objects and minor bugfixes

Added support for QuadMesh and LineCollection objects used by the pcolormesh and contour methods. This makes it possible to export figure like the provided example
![example](https://cloud.githubusercontent.com/assets/6471381/2776265/4c95c2d4-cad1-11e3-9cfc-708b14dc9c58.png)
The extension for the LineCollection is straight forward and used the existing _draw_path method. The _draw_path was extended with the simplify value. The default behaviour does not change, however when exporting a Line for the LineCollection it was observed that the simplification of the vertices removed to many samples for a smooth line.

The extension for the QuadMesh is more difficult. A direct export of the vertices is difficult and would inflate the tikz file to a large size. Furthermore advanced features like shading and custom colormaps make this approach difficult. Therefore, the QuadMesh is exported as a png using a new rendere object and imported by the tikz as an image like the _draw_image implementation. Therefore it supports all features of the pcolormesh function like gouraud shading. The resolution of the png can be controlled by changing the size or dpi when creating the image. It least for gouraud shaded images, the rescaling of the png inside the tikz should not cause a large decrease of the image quality as the pcolormesh are commonly smooth.

Smaller changes are:
* Fixed a bug in _draw_line2d when defining a marker color with a numpy array.
* Exported the conversion of the linewidth to _mpl_linewidth2pgfp_linewidth to be reused by the _draw_linecollection method.
* Added support to dash patterns to the linestyle conversion as the linecollection saves all linestyle as patterns