[R] How to vectorize plot graphic?

Alexander Shenkin ashenkin at ufl.edu
Sun Dec 1 18:39:24 CET 2013


Thanks Jeff.  I'm not sure to which manual you are referring.  Nothing
like what you mention is found here:
http://cran.r-project.org/manuals.html .  Perhaps you're referring to
The Data Import/Export Manual, but that wouldn't make sense.  Googling
"R Input/Output manual" doesn't help.

Regarding the device, I'm in R-Studio, plotting to the standard device
there (I suppose).  In any case, I'm not totally sure what the interface
between R-Studio's plot window and the R instance is.  I think that, as
you say, what I'm getting is as expected.  I zoom and the plot zooms as
expected.  So, I guess that part is solved.  However, the writing to
.wmf as a bitmap instead of a vector is still a mystery to me.

Thanks,
Allie

On 12/1/2013 12:29 PM, Jeff Newmiller wrote:
> You have mentioned nothing about the device you are writing the plot to. If to the default and you are copying it from there as a bitmap, then what you are describing sounds as expected. Read the R Input/Output manual (again) for other output options.
> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<jdnewmil at 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.
> 
> Alexander Shenkin <ashenkin at ufl.edu> wrote:
>> Hi Folks,
>>
>> Using ggplot, I've produced the following graphic:
>> http://i.imgur.com/39a139C.png
>>
>> The graphics in the plot seem to be bitmapped and not vectorized.  That
>> is, the vertical and horizontal lines jump rows of pixels instead of
>> having just nice, angled lines.  Any thoughts about how to get these
>> graphics vectorized?  Or am I misunderstanding something?
>>
>> Another example:
>>
>> The code:
>>
>>    require(ggplot2)
>> df = data.frame(x = c(1:360), y = sin(seq(0,2*pi*3,length.out = 360)))
>>    ggplot(df, aes(x=x, y=y)) + geom_line()
>>
>> produces http://i.imgur.com/mjjSKih.png
>>
>> Perhaps what I'm dealing with here is my screen resolution.  However, I
>> use ggsave() to save .wmf files, and those also turn out to be bitmaps
>> and not vectors.
>>
>> Thanks,
>> Allie
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> 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