Saving a plot as png 224*224*3 image

4 ビュー (過去 30 日間)
ali
ali 2021 年 2 月 17 日
コメント済み: ali 2021 年 6 月 24 日
Hi,
I have generated a plot in Matlab as shown in figure.When i save it using 'saveas(gcf,'im1.png')' , it is saved as a 656*875*3 png image.I want to save it as 224*224*3 png image without the axis titles,labelling and colorbar.i.e.only the actual plot.Can anyone kindly guide on it?
guide about
Thanks
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 2 月 17 日
編集済み: KALYAN ACHARJYA 2021 年 2 月 17 日
Can you share plot details?
ali
ali 2021 年 2 月 18 日
Its a spectrogram with frequency on y axis and time on x axis

サインインしてコメントする。

回答 (1 件)

Rik
Rik 2021 年 2 月 17 日
You can do three things:
  1. Don't create your image as a plot, but as an image.
  2. Crop the image down to the location of your axes object.
  3. Use export_fig.
  14 件のコメント
ali
ali 2021 年 6 月 17 日
S=load('data.mat');
x = sum(S.data/max(max(abs(S.data)))); %normalizing bw 0 and 1 and summing across rows
figure();
c=jet(256);colormap(c);
spectrogram(x,hanning(512),487,1024,12.4e3,'centered','yaxis','MinThreshold',-50);
ali
ali 2021 年 6 月 24 日
Hi @Rik,
Waiting for your response.
thanks

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by