From ligges at statistik.tu-dortmund.de  Thu Mar 26 19:34:28 2009
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Thu, 26 Mar 2009 19:34:28 +0100
Subject: [Rd] savePlot export "strange" eps (PR#13620)
In-Reply-To: <49C901BA.3080305@u-paris10.fr>
References: <20090323233509.D35A8283218F@mail.pubhealth.ku.dk>
	<49C8EFA6.2020309@statistik.tu-dortmund.de>
	<49C901BA.3080305@u-paris10.fr>
Message-ID: <49CBCAB4.2070203@statistik.tu-dortmund.de>



Christophe Genolini wrote:
> Sorry for that... I find a strange behavior in "savePlot" ; before 
> report a bug, I read the posting guide and I try to simplify my exemple 
> as much as possible. Doing this, I change my code and I remove the " 
> type='eps' " option... Sorry !
> 
> Let's start this again.
> 
> When I use savePlot(file="toto.eps",type="eps") and I try to incorporate 
> "toto.eps" in a LaTeX document, I get a strange behavior:
> LaTeX run normaly, so does dvips. But the generated postscript include a 
> graph that overwirte the line above it.
> If my latex is
> 
> bonjour bonjour2 bonjour3
> \begin{center}
> \includegraphics[width=12cm]{toto.eps}
> \end{center}
> 
> Then "bonjour2 bonjour3" is hidden by the graph.


No so for me, but let me (what you still not did), give a reproducible 
example:

I opened some vanilla R-2.8.1 under Windows using

RGui --vanilla

in R:

plot(1:10)
savePlot(file="d:/temp/toto.eps", type="eps")

Then I created a LaTeX document:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
bonjour bonjour2 bonjour3
\begin{center}
  \includegraphics[width=12cm]{toto.eps}
\end{center}
\end{document}


and ran LaTeX and dvips.

All is fine.  So, *please*, specify a reproducible example or we cannot 
help. I presume you have a LaTeX problem. Anyway, a better way to export 
your graphs would be to use a proper device directly - independent of 
what happens here.

And also, this is still not proved to be a bug, particularly not in R!

Uwe Ligges




> Version: 2.8.1
> OS: Windows XP
> LaTeX : Miktex 2.7
> 
> Christophe
> 
>>
>>
>> cgenolin at u-paris10.fr wrote:
>>> Full_Name: Christophe Genolini
>>> Version: 2.8.1
>>> OS: Windows XP
>>> Submission from: (NULL) (82.225.59.146)
>>>
>>>
>>> savePlot export "eps" graph that seems to be incorrect. 
>>
>>
>> Looks like you saved an EMF rather than an eps file???
>>
>> Uwe Ligges
>>
>>
>>
>>> Trying to incorporate them in a LaTeX file, I get : 
>>> ++++++++++++++++++++++
>>> Cannot determine size of graphics in foo.eps (no BoundingBox)
>>> ----------------------
>>>
>>> Trying to open them with GSview, I get :
>>> ++++++++++++++++++++++
>>> GSview 4.9 2007-11-18
>>> AFPL Ghostscript 8.54 (2006-05-17)
>>> Copyright (C) 2005 artofcode LLC, Benicia, CA.  All rights reserved.
>>> This software comes with NO WARRANTY: see the file PUBLIC for details.
>>> Displaying non DSC file C:/Documents and Settings/Christophe/Mes
>>> documents/Recherche/Trajectoires/kmeal/trajectories/testsDev/toti.eps
>>> Error: /undefined in 
>>> Operand stack:
>>>
>>> Execution stack:
>>>    %interp_exit   .runexec2   --nostringval--   --nostringval--  
>>> --nostringval--   2   %stopped_push   --nostringval--   
>>> --nostringval--   false  1   %stopped_push   1   3   %oparray_pop   
>>> 1   3   %oparray_pop   1   3  %oparray_pop   1   3   %oparray_pop   
>>> .runexec2   --nostringval--  --nostringval--   --nostringval--   2   
>>> %stopped_push   --nostringval--
>>> Dictionary stack:
>>>    --dict:1130/1686(ro)(G)--   --dict:0/20(G)--   --dict:74/200(L)--
>>> Current allocation mode is local
>>> Last OS error: No such file or directory
>>>
>>> --- Begin offending input ---
>>>    ?      L   z  f          C  fC   EMF   $6  7        
>>> l       ?    ?                ?? ? G r a p h A p p     
>>> %        ?%
>>>        ?%        ?%        ?%        ?%        ?%        
>>> ?%       ?%        ?%        ?%        ?%        ?K   @   
>>> 0                  N   N   y  @  N   N   y  @  %        
>>> ?%        ?:         _   8      8       8         
>>>                        %                  ;            l   *  
>>> 6      Z  ?  <      @      f   ?  `  0  %   
>>>     ?(         %        ?%        ?K   @   0             
>>>       N   N  y  @  N   N   y  @  %        ?%        ?:   
>>>       _   8      8       8                                %   
>>>                ;            m  ?  6      Z  ?  <      
>>> @      g  ?  `  ?  %   
>>>     ?(         %        ?%        ?K   @   0             
>>>              ?  ?          ?  ?  %        ?%        ?:   
>>>       _   8      8       8                            --- End 
>>> offending input ---
>>> file offset = 1024
>>> gsapi_run_string_continue returns -101
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>



[Rd] savePlot export "strange" eps (PR#13620)
Uwe Ligges