mpld3/mplexporter — pull request #5 by theengineear (2014-02-26 07:30:11+00:00)
Title: Exporter experimental changes

Jake,

Here are some possible options to make the Exporter class a bit more straightforward. The explanation is in the latest commit. Basically, I tried to make all of the calls to the renderer 'look' the same:
self.renderer.draw_obj(obj, properties)

This way the user is always unpacking a dict. I simply nested the old 'style' dict into the new 'properties' dict. I also had a general question of whether there would ever be an option for a line to come in with 'axes' coordinates? I think i was reading about 'blended' transforms which use data and axes coordinates to ensure objects always span axes vertically or horizontally. I made a note of it in the docstring for Exporter.process_transform.

This changes things around a little bit, which is why I am requesting from this branch again. I think trying to standardize communications between the exporter and renderer like this will generally be helpful.

Let me know what you think! I noticed a bunch more 'draw' methods going into the Exporter, so I though I'd say something about this before future changes would be more painful!

Cheers,

Andrew

ps. I the changes to the plotly files here are an updated version of the pull request I send you on the 'master' branch. If you end up merging this, you can close out the other request :)