[R] Strange behavior of savePlot

Christophe Genolini cgenolin at u-paris10.fr
Thu Feb 26 11:20:09 CET 2009


Uwe Ligges a écrit :
>
>
> Christophe Genolini wrote:
>> Uwe Ligges a écrit :
>>>
>>>
>>> Christophe Genolini wrote:
>>>> Hi all,
>>>>
>>>> I am using savePlot in a loop for saving several graph but I get 
>>>> some graph in 553x552, some other in 1920x1119. How comes ?
>>>> My data are almost all the same (same label, same xlim / ylim, 
>>>> almost same data. Only the color changes).  I save them in bmp.
>>>> Thanks for your help.
>>>
>>>
>>> Rather than using a Windows Device and copying the contents, just 
>>> use the bmp() device directly if you really want bitmaps.
>>>
>>> Uwe Ligges
>> I do not want a bitmaps. I use savePlot in a library, so I let the 
>> user decide whith export he wants.
>
>
> Then, why not let the user choose a proper device?
Because I program a graphical interface that let the user to chose the 
graph he want to export (that can be one but also 50). Then he sets 
dynamicaly the parameters for all the graphics he wants to export. Then 
all the graphs are exported at once.
> Anyway, the resulting bitmap is copied from the screen device, that 
> means the size is also copied.
> That means if you have some 1600x1200 screen and your windows device 
> is resized to fullscreen, than you will almost get 1600x1200 pixels in 
> your bitmap...
Ok, the "strange behevior" was occuring because I change the size of the 
windows during the export...
Thanks a lot

Christophe

> Uwe Ligges
>
>
>> Christophe
>>
>> ______________________________________________
>> R-help at 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.
>




More information about the R-help mailing list