Filter löschen
Filter löschen

saving figure at specefic resolution

19 Ansichten (letzte 30 Tage)
lital
lital am 19 Mai 2011
Hi,
I'm loading an image (with imread) and then I'm plotting some points on this images (with scatter and imshow for the image). The problem is, while using saveas to save the figure, im getting a completly different resolution. My image is 1360*768 pixels and is saved at 1200*900. I tried setting 'PaperPositionMode' to auto - but then I'm getting an 2384*1335 image saved. Also tried changing 'papersize' and 'paperposition' but still, i cant seem to have the figure saved at 1360*768. Does anyone know how to do this, I'v tried all the suggestions i found related to this subject but none worked.
Thanks.

Akzeptierte Antwort

Arnaud Miege
Arnaud Miege am 19 Mai 2011
Use the print command with the -r flag.
HTH,
Arnaud
  4 Kommentare
Arnaud Miege
Arnaud Miege am 19 Mai 2011
Have a look at this solution and see if that addresses your problem:
http://www.mathworks.com/support/solutions/en/data/1-9Q4WXL/
lital
lital am 19 Mai 2011
Thank You so much!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Andrew Fowler
Andrew Fowler am 19 Mai 2011
Have you tried IMWRITE? Depending on the format you want to save as, you can specify the resolution in the command. You have to check for each format what the actual parameters are called (just use help imwrite to see specifics), but here is an example for a TIFF file:
imwrite(a, 'your_image.tif','TIFF','Resolution',[1360 768])
  1 Kommentar
lital
lital am 19 Mai 2011
Thanks for your answer.
imwrite only accepts an image (a matrix representing the pixels of an image) to save and I'm trying to save the figure holding the image with the scatter plot on it.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by