Figures

As we have already seen, figures are windows that hold graphs/graphics. We can modify figures using code or interactively to show what we want. Figures can be easily created, modified and stored (saved), and this section covers the ways in which you can do that.
 

3.8.1 Creating Figures
To create a figure, you can either directly or indirectly do so. To directly create a figure, you’d simply use the code figure in a script or in the Command Window. To indirectly create a figure, you can use commands such as plot(x,y) to open up a new figure but with the predefined plot in it.
 

3.8.2 Editing Figures
As it was previously touched on in the previous section, you can edit figures either interactively or by using code. To edit interactively, you’d use the tools in the toolbar at the top of the figure, and you can then generate a code (through the file menu) after you are done making modifications, that you can use to replicate the same figure for similar data. You can also use code to edit figures (such as controlling axes, creating axis labels, modifying line styles and colours, etc. as explained in the previous sections).
 

3.8.3 Saving Figures
You can save a figure by clicking on the File menu and selecting “Save As…”. You can then save the file as a jpg, png or many other file formats.