In addition to the manner in which the PDF files are generated, you might want 
to consider the possibility that the lines are artifacts created by your PDF 
viewer.

See:

  http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-there-unwanted-borders


Regards,

Marc Schwartz


On Jun 3, 2013, at 9:08 AM, Viechtbauer Wolfgang (STAT) 
<wolfgang.viechtba...@maastrichtuniversity.nl> wrote:

> I have come across this issue many times. I have yet to find a pattern in 
> what causes this.
> 
> At least I can offer a workaround. Instead of using "Save As" to create the 
> pdf, what I do is "Print" with "Adobe PDF" as the printer. This gets rid of 
> those lines and the resulting pdf looks just as nice.
> 
> There is one slight disadvantage to this. Hyperlinks in your Powerpoint 
> presentation that are not directly given as a URL (with no line breaks) will 
> no longer work. So, if you have:
> 
> http://www.r-project.org/
> 
> in your slide, then this will be "clickable". However, if the hyperlink is a 
> property of the object (e.g., text, button) in the slide, then it won't be 
> anymore clickable when you "print" it (while "Save As" does preserve those 
> links).
> 
> Best,
> Wolfgang
> 
> --   
> Wolfgang Viechtbauer, Ph.D., Statistician   
> Department of Psychiatry and Psychology   
> School for Mental Health and Neuroscience   
> Faculty of Health, Medicine, and Life Sciences   
> Maastricht University, P.O. Box 616 (VIJV1)   
> 6200 MD Maastricht, The Netherlands   
> +31 (43) 388-4170 | http://www.wvbauer.com   
> 
> 
>> -----Original Message-----
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
>> On Behalf Of Jeff Newmiller
>> Sent: Monday, June 03, 2013 13:58
>> To: Erling Johan Frøysa; r-help@r-project.org
>> Subject: Re: [R] Strange behaviour of R graphics copied to PowerPoint
>> 
>> I have not seen this particular problem, but I have seen other problems
>> and I tend to export bitmaps or pdf files as a result.
>> 
>> Note that a reproducible example is usually required to to obtain help on
>> this list, and posting in HTML format is bad because it mutilates example
>> code, so fix your email client. Please read the Posting Guide for more
>> etiquette tips.
>> --------------------------------------------------------------------------
>> -
>> Jeff Newmiller                        The     .....       .....  Go
>> Live...
>> DCN:<jdnew...@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
>> Go...
>>                                      Live:   OO#.. Dead: OO#..  Playing
>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>> /Software/Embedded Controllers)               .OO#.       .OO#.
>> rocks...1k
>> --------------------------------------------------------------------------
>> -
>> Sent from my phone. Please excuse my brevity.
>> 
>> "Erling Johan Frøysa" <erling.fro...@gmail.com> wrote:
>> 
>>> Hello,
>>> 
>>> I am using R to create graphics, especially to plot time series charts.
>>> These charts are then copied as metafiles (for best quality) to a
>>> PowerPoint
>>> presentation and then saved to PDF (via the "Save As" dialog").
>>> 
>>> Attached is two pictures. The first picture shows how my chart looks
>>> like in
>>> the R Graphics window, and the second picture shows how the chart
>>> becomes
>>> after saving it to PDF.
>>> 
>>> < http://r.789695.n4.nabble.com/file/n4668522/R.png>
>>> 
>>> < http://r.789695.n4.nabble.com/file/n4668522/Rppt.png>
>>> 
>>> As you can see. After saving the metafile to PDF via PowerPoint, some
>>> straight lines appears (it seems like all of the lines has the same
>>> origin
>>> in the upper left corner and ends somewhere on the times series line).
>>> This
>>> happens in both plot() and ggplot(). The problem appears more often
>>> when
>>> using daily data in my time series. With monthly data the problem don't
>>> exist.
>>> 
>>> Have anyone experienced this before? Do you think the problem is
>>> related to
>>> R or to Powerpoint?
>>> 
>>> Thanks all,
>>> 
>>> E

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to