Getting Started

What

Taste is a pure-Python library with a hard dependency on Matplotlib that is most commonly present in every Jupyter installation that uses plots. It does not use any C/C++ extension directly but as Matplotlib is a C/C++ extension library, on some platforms (or in Docker container) pip might not correctly detect what Wheel to choose and you might need to install a compiler (such as GCC) from your OS’ package manager or compiler’s official website.

It attempts to provide a simple interface and out-of-box available set of plots even for beginners or people who come from environments where plots are created via a drag&drop approach and the learning curve of the underlying Matplotlib engine isn’t feasible for them at the moment.

Where

Feel free to come and say Hi! or contribute:

Why

Using (Jupyter) notebooks is easy to learn and allows people to keep the code bundled with results in a single place which allows reproducibility in a way or at least documenting how the results were obtained if the code becomes outdated. In combination with Matplotlib the notebook is a powerful tool to quickly assemble results starting from simple reports pulled from CSV or DB up to some hard-core scientific experiments. It has some noticable quirks though.

When displaying the data there are two most common situations:

  • Python object representation (repr(object)) is leaking to the notebook

  • the plot isn’t ready to be displayed yet, but the notebook is already rendering it

Getting rid of the object representations is quite easy, just assign it to some variable. The second situation is a little bit harder to resolve and each approach known to me is rather ugly because it either requires keeping a util library within any of my projects or the notebook itself is polluted with helper functions.

How

Taste addresses these issues by exposing only high-level classes (such as taste.BarPlot) which expect the plot attributes set in an intuitive way as well as provide helper methods to adjust the underlying Matplotlib plot stored there.

It uses Anti-Grain Geometry (Agg) backend to draw the images in the background, therefore it does not polute your output with unnecessary stringified Python object representations nor renders prematurely incomplete plots to the notebook. You get to choose when to render in the notebook, not the other way around.