backend layer the matplotlib backend layer handles the generation of output to different target formats matplotlib itself can be used in many different ways to generate many different outputs matplotlib can be used interactivelyit can be embedded in an application (or graphical user interface)it may be used as part of batch application with plots being stored as pngsvgpdf or other images etc to support all of these use casesmatplotlib can target different outputsand each of these capabilities is called backendthe "frontendis the developer facing code the backend layer maintains all the different backends and the programmer can either use the default backend or select different backend as required the backend to be used can be set via the matplotlib use(function for exampleto set the backend to render postscript usematplotlib use('ps'this is illustrated belowimport matplotlib if 'matplotlib backendsnot in sys modulesmatplotlib use('ps'import matplotlib pyplot as pyplot it should be noted that if you use the matplotlib use(functionthis must be done before importing matplotlib pyplot calling matplotlib use (after matplotlib pyplot has been imported will have no effect note that the argument passed to the matplotlib use(function is case sensitive the default renderer is the 'aggwhich uses the anti-grain geometry +library to make raster (pixelimage of the figure this produces high quality raster graphics based images of the data plots the 'aggbackend was chosen as the default backend as it works on broad selection of linux systems as its supporting requirements are quite smallother backends may run on one particular systembut may not work on another system this occurs if particular system does not have all the dependencies loaded that the specified matplotlib backend relies on