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 CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by