Added functions for automatic piechart plotting with matplotlib