Draw a polygone (function patch)
// make a figure of size 700 x 500 pixels fig = new matplot.Figure("plot",700,500, {renderer: matplot.RasterCanvas}); // add axis to the figure ax = fig.axes(); // blue triangle ax.patch([0,2,1],[0,0,1],{color: 'blue'}); // draw everything fig.draw();