Saving a plot as png 224*224*3 image
Ältere Kommentare anzeigen
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 Kommentare
KALYAN ACHARJYA
am 17 Feb. 2021
Bearbeitet: KALYAN ACHARJYA
am 17 Feb. 2021
Can you share plot details?
ali
am 18 Feb. 2021
Antworten (1)
Rik
am 17 Feb. 2021
0 Stimmen
You can do three things:
- Don't create your image as a plot, but as an image.
- Crop the image down to the location of your axes object.
- Use export_fig.
14 Kommentare
ali
am 18 Feb. 2021
Rik
am 18 Feb. 2021
That depends on how you created this plot. You can probably round your data to integer and use ind2rgb to convert to an RGB image. If you attach example data and your code, we might be able to give an explicit example.
ali
am 20 Feb. 2021
Rik
am 20 Feb. 2021
Your data is not attached and if hanning is a function, it no longer exists (although there is a hann function).
I don't have the signal processing toolbox, so I will need to expirement with the Run feature in this forum.
ali
am 23 Feb. 2021
Rik
am 23 Feb. 2021
Can you reduce the size of the variables? Is all data really necessary? The image will look differently, but I should still be able to reproduce a similar image.
ali
am 8 Mär. 2021
Rik
am 8 Mär. 2021
What code should I be using?
ali
am 22 Mär. 2021
Rik
am 24 Mär. 2021
Your mat file contains the variable data, which is not even used by the code. How am I supposed to help you like this?
Check that your code doesn't use any variables appart from those in the mat file.
Put your mat file in a separate folder, call clearvars and then run your code. If it doesn't run for you, it will not run for me either.
And please use the S=load('data.mat') syntax. That will show you immediately where variables are coming from. If it isn't followed by AA=S.AA; I don't even have to download your mat file before telling you that you fix your example.
Also, use the formatting tools when posting.
ali
am 16 Jun. 2021
Rik
am 16 Jun. 2021
Please use the S=load('data.mat') syntax.
ali
am 17 Jun. 2021
ali
am 24 Jun. 2021
Kategorien
Mehr zu Images finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!