In this chapter, we will cover the following recipes:
In the previous chapters of this book, we learned how to make graphs of different types and styles using various functions and arguments. In this chapter, we will learn some tricks and tips to add some polish to our graphs so that they can be used for publication and presentation.
We will look at the different image file formats we can save our graphs in and learn how to export our graphs at high resolutions. Most publications require authors to submit high resolution figures along with their manuscripts. We will also look in more detail at vector formats such as PDF, SVG, and PS, which are preferred by most publications as these are resolution-independent formats.
We will also learn how to add mathematical and scientific notations to graphs. These are indispensable in any scientific data visualization. We will also see how to add text descriptions inside graphs, which can be very handy as slides for presentation. Graph templates are a way to save time by creating functions, which cut down repetitive code so that, once we are happy with the basic structure of a graph, we can experiment with various predefined themes to choose the most appropriate color combinations and styles.
Finally, we will also look at how to choose fonts under different operating systems and graphic devices. We will also learn how to add new font mappings and to choose additional font families for vector file formats.
As with the previous chapters, it is best to try out each recipe first with the example shown here and then with your own datasets so that you can fully understand each line of code. If you are preparing any graph for publication or presentation, it is also good practice to print out the saved graphs and verify that the printed output looks correct and clear.
3.15.4.135