1. Using the MATLAB Graphical Environment
Select the figure window that shows the figure to be saved and then follow the steps mentioned below:
- Click on File>>Export Setup.
- A menu named as “Export Setup: Figure Name” must have popped up.
- On the left side of the menu, choose the option named “Rendering”. After that, change the value of:
- ‘Colorspace’ to ’grayscale’
- ‘Resolution(dpi)’ to 300
This step is shown in image file “Step3.jpeg” attached to the solution.
- Click on ‘Apply to Figure’ button.
- Click ‘OK’ button.
- The menu should have disappeared and you should see the figure window with all your changes applied.
- Click on File>>Save As.
- Now, you can save the file to your system. Please do not forget to save as “TIFF image”.
2. Saving a figure to an image file programmatically
a) Use "print" as:
>> print(gcf, '-dtiff', 'myfigure.tiff');
b) Alternatively, you could do:
>> imagewd = getframe(gcf);
>> imwrite(imagewd.cdata, 'myfigure.tiff');
To change the quality of a TIFF file, you can specify 'Compression',''none' and increase the resolution with 'Resolution',300.