mpld3/mplexporter — pull request #17 by theengineear (2014-03-15 02:08:58+00:00)
Title: Added a `draw_legend` context manager.

To ignore commands from the exporter, renderers can check the following
attribute from the Renderer class from which they are a subclass:

`if self._current_legend is not None`

Files Changed:
==============

exporter.py
-----------
- added `crawl_legend`, similar to other `crawl_*` methods
- within `crawl_ax`, renderer's `draw_legend` is now called

base.py
-------
- added `draw_legend`, a context manager
- added `open_legend`, to be reimplemented by subclasses
- added `close_legend`, to be reimplemented by subclasses

utils.py
--------
- added `get_legend_properties`, just returns handles and labels

fake_renderer.py
----------------
- updated self.output to include opening and closing legends

test_basic.py
-------------
- updated comparison strings to include opening and closing legends