Matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python and ipython shell, web application servers, and six graphical user interface toolkits.
In handling big amounts of numerical data is important to have good methods and procedures to treat information. Traditional graphical plotters has the disadvantage of being very tedious in data treatment, the use of windows and toolbars is ineficient for big amounts of plots and data. Programs like Matplotlib and Gnuplot utilizes an input file, which is very clear and readable, so you can design scripts to treat the flows of data.
Creating plots is one of the most important jobs you have to do to synthesize all your results. Good plots will give your work the impact that needs. One has to be very carefull to choose the type of plot you will use. Here are some suggestions to help you make good looking plots.
- A word about Python, you have to ensure you have install matplotlib on your python environment, aslo some shared libraries as numerical python are usefull.
- Black & White vs Color. It is very tempting to make colorfull plots to differenciate each event you analyze, but usually when people prints your document, it will be at b&w. So in general try to use b&w graphics, and when trying to differentiate between diferent events, try to use different line styles. Color can be use if your results are going to be showed on a presentation.
- Size. It is very common tu use the A4 or letter size page, so there are two standar sizes, the 9X3 cm or 18X5 cm. First one fits ok on the half of a page, second fits on all page. There are different variations, one particulary used in this laboratory is the comparisson between DOS, so here you can use a 9X13 cm.
- File type, extention. File type is very important because each terminal output treats the resolution different. There are three recommended types: Postscript eps, vector svg and pngcairo. The eps type renders the graphic in the terminal you are printing the document, this means pdf or the printer tranlate the eps script into the graphic making high quality prints whit no pixelizing. Vector svg files must be render, to the size and quality, before your image is inserted in the document. You can render different sizes with no loose of quality. Another type of file is the png file, this type is very lightweight and portable, but as a raster image pixelizes when changing its size.