AndrewShmig
AndrewShmig

Reputation: 4923

How to save image of a histogram?

I have created a histogram using (hist) function... after that, I need to save created image in a file *.png (jpeg) ? Using what function can I do this?

thx

Upvotes: 1

Views: 2882

Answers (2)

Juan
Juan

Reputation: 1540

I usually use something similar to:

print('-f1','-dtiff','file_name');

to print the figure 1 (-f1) ... anyway check the help for a best description of print and you will find the right driver (-d option) for the type of file you need and extra options

Upvotes: 1

gnovice
gnovice

Reputation: 125864

To save a figure as an image you can use the functions PRINT or SAVEAS, or you can use the figure menu option File -> Save.

For more information on exporting figures from MATLAB, check out this documentation.

Upvotes: 2

Related Questions