a function to save a plot as a (compressed) image file.

i wanted to know which function can be used to save a plot as compressed image

回答 (2 件)

Anjaneyulu Bairi
Anjaneyulu Bairi 2024 年 1 月 10 日

0 投票

Hi,
I understand that you are trying to save a plot as an image file.
"exportgraphics" function is used to save the plot as an image file.
Here is the sample code for how to save a plot as an image file.
plot(rand(5,5))
ax = gca;
exportgraphics(ax,'LinePlot.jpg')
Refer the below documentation link for more information
Hope it helps to resolve your query.

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

タグ

質問済み:

2024 年 1 月 9 日

回答済み:

2024 年 1 月 10 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by