# no BoundingBox

Hi all,

I have generated some figures with matplotlib (savefig('test.png')
savefig(test.jpg')).

If I try to include them via

\includegraphics[width=8cm]{test.jpg}

I get

LaTeX Error: Cannot determine size of graphic in test.jpg (no BoundingBox).

I am using latest svn versions of numpy/scipy and matplotlib.

Any idea how to fix this problem ?

Nils

Nils,
That's far more a Latex question than a matplotlib one.
Short answer: you can't fix the BBox from a JPEG, there's none !
From what I remmbr from my LaTeX years, you need to transform the jpeg to a
format LaTeX can understand, viz '.ps' or '.eps'
Check
http://www2.eng.cam.ac.uk/~pmg26/hpage/teaching/graphics_LaTeX.html
or the help/manual of the graphicx package, or google "import jpeg latex"

PGM wrote:

Nils,
That's far more a Latex question than a matplotlib one.
Short answer: you can't fix the BBox from a JPEG, there's none !
>From what I remmbr from my LaTeX years, you need to transform the jpeg to a
format LaTeX can understand, viz '.ps' or '.eps'
Check
http://www2.eng.cam.ac.uk/~pmg26/hpage/teaching/graphics_LaTeX.html
or the help/manual of the graphicx package, or google "import jpeg latex"

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I am using pdflatex and I have used *.png files before without any trouble.
So are there any changes in matplotlib's svn wrt to these graphic formats within the last two weeks ?

Nils

Nils Wagner wrote:

Hi all,

I have generated some figures with matplotlib (savefig('test.png')
savefig(test.jpg')).

If I try to include them via

\includegraphics[width=8cm]{test.jpg}

I get

LaTeX Error: Cannot determine size of graphic in test.jpg (no BoundingBox).

I am using latest svn versions of numpy/scipy and matplotlib.

Any idea how to fix this problem ?

Nils

Sorry for the noise. It was just a missing \usepackage{graphicx} in the
header of my new tex file.

Nils