Dear List: I am unsure if my problem is with Sweave or LaTeX. Anyhow, I am using the MikTeX distribution and TexnicCenter. I can easily create Sweave files and all goes well until I try to incorporate graphics. I use the same code as found in the examples found in the users manual. In R, the graphics I want are created as Sweave is creating the .tex file. When I examine the .tex file created by Sweave, it includes the includegraphics{} statement needed. When I run LaTeX on the .tex file, everything works except that the graphics I want are not displayed. However, when I examine the pdf or eps files created, there is nothing there. When I view the EPS using Ghostview, the file is empty, but there appears to be a bounding box surrounding nothing. When I open the pdf graphic, there is nothing there either. I have tried creating both dvis and pdf files. Again, text works perfectly, but graphics do not work. Does anyone have any suggestions? Many thanks, Harold
Harold Doran wrote: [... Sweave use...]> However, when I examine the pdf or eps files created, there > is nothing there. When I view the EPS using Ghostview, the file> is empty, but there appears to be a bounding box surrounding > nothing. When I open the pdf graphic, there is nothing there > either. I have tried creating both dvis and pdf files. Again, > text works perfectly, but graphics do not work. Are they lattice graphics? They need to be wrapped in a print() statement, like print(xyplot(...)) Without that, they don't produce output to eps or pdf. Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz
Hi! Would you please include more info so one can try to help you? It would be useful if you include your R-version, your OS and sample code. On Sat, 20 Dec 2003, Harold Doran wrote:> Dear List: > > I am unsure if my problem is with Sweave or LaTeX. Anyhow, I am using the MikTeX distribution and TexnicCenter. > > I can easily create Sweave files and all goes well until I try to incorporate graphics. I use the same code as found in the examples found in the users manual. > > In R, the graphics I want are created as Sweave is creating the .tex file. When I examine the .tex file created by Sweave, it includes the includegraphics{} statement needed. > > When I run LaTeX on the .tex file, everything works except that the graphics I want are not displayed. > > However, when I examine the pdf or eps files created, there is nothing there. When I view the EPS using Ghostview, the file is empty, but there appears to be a bounding box surrounding nothing. When I open the pdf graphic, there is nothing there either. I have tried creating both dvis and pdf files. Again, text works perfectly, but graphics do not work. > > Does anyone have any suggestions? > > Many thanks, > > Harold > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >-- Ulises M. Alvarez LAB. DE ONDAS DE CHOQUE FISICA APLICADA Y TECNOLOGIA AVANZADA UNAM umalvarez at fata.unam.mx
Yes, they were lattice and your suggestion did the trick. Many thanks! -----Original Message----- From: Jason Turner [mailto:jasont at indigoindustrial.co.nz] Sent: Sun 12/21/2003 12:30 AM To: Harold Doran Cc: r-help at r-project.org Subject: Re: [R] Sweave/LaTeX Problem with EPS PDF Harold Doran wrote: [... Sweave use...] > However, when I examine the pdf or eps files created, there > is nothing there. When I view the EPS using Ghostview, the file > is empty, but there appears to be a bounding box surrounding > nothing. When I open the pdf graphic, there is nothing there > either. I have tried creating both dvis and pdf files. Again, > text works perfectly, but graphics do not work. Are they lattice graphics? They need to be wrapped in a print() statement, like print(xyplot(...)) Without that, they don't produce output to eps or pdf. Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz