Hello,
I am including PNG plots that are obtained from MATLAB figures with 600dpi resolution.
I use
\includegraphics[width=\textwidth]{image}
command inside a figure.
The page where the image should be shows only figure caption, which is I believe due to image not being scaled and therefore too big (image resolution 4800x3600 though its size only 90K). I came to such conclusion b/c image fits the page only when I out 0.05 factor like this:
\includegraphics[width=0.05\textwidth]{image}
Also tried \linewidth instead of \textwidth and tried putting \makebox[\textwidth] around \includegraphics command. But the behaviour is the same.
How can I make it scale to the page width without playing with scaling multiple?
Could 600dpi resolution be the issue?
The whole document is quite big, its type is:
\documentclass{report}
Resulting format of document PDF. Build commands: latex.exe +dvipdfm.exe on Win7
Please let me know if I should add other details.
Tried to google for several hours, couldn't find exactly this issue.
Thank you.
Graphics, Figures & Tables ⇒ width=\textwidth do not scale PNG image correctly
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: width=\textwidth do not scale PNG image correctly
Welcome, you could upload the picture file so we can investigate directly with the file.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
width=\textwidth do not scale PNG image correctly
Thanks. have attached the image.Johannes_B wrote:Welcome, you could upload the picture file so we can investigate directly with the file.
- Attachments
-
- This image does not scale correctly
- plot.png (91.59 KiB) Viewed 8606 times
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: width=\textwidth do not scale PNG image correctly
The image scales down perfectly. Nothing strange to report. Can you give more details?
By the way, using such huge images just blows up the file size of the pdf without adding any detail, you could use much smaller images. Or generate the diagrams from within LaTeX.
By the way, using such huge images just blows up the file size of the pdf without adding any detail, you could use much smaller images. Or generate the diagrams from within LaTeX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.