ashishknitcs edited this page Dec 28, 2016 · 17 revisions
Clone this wiki locally

Welcome to the mpld3 wiki!

mpld3 missing features

There are many aspects of matplotlib plots which are not accurately reflected in mpld3 renderings. Many of these are known, some are simple fixes, and some are more complex. Below is a list of these: please feel free to add to them:

Things that should be fixed:

  • the figure background color is not correctly applied. (note: the reason this was not done from the beginning is that the default background color is an ugly shade of gray. On savefig, matplotlib overrides this default: a behavior I've never fully understood. Why have a different default when a graph is viewed and when it is saved? IPython gets around this by modifying the rc file when %matplotlib is run. We'll have to come up with a similar hack for mpld3)
  • axis colors and tick colors are not faithfully applied.
  • plt.axis('off') does not.
  • fonts are not faithfully translated to d3
  • quadmesh uses a polygon collection as an approximation (see, e.g. colorbars). The built-in SVG backend has a means of approximating this; we should do the same within mpld3.
  • drawstyle='steps' has no effect in plt.plot
  • plt.text does not show newlines or latex faithfully
  • markers for plt.scatter do not appear in legends
  • all line styles ('dashed', 'dotted', etc) render as solid lines in plt.vlines()
  • plt.annotate does not get the text positions or embellishments right
  • ticker.MultipleLocator is not supported
  • xticks(x,N,rotation='vertical') rotation is not working

Things that will be very difficult to fix:

  • objects with mixed transforms (e.g. lines created by plt.axvline and plt.axhline) are not correctly rendered.
  • tick locations and tick formatting is not accurately reflected
  • plt.xkcd()
  • mpl_toolkits.mplot3d.Axes3D and any related 3d plotting stuff