[R] How to vectorize plot graphic?
Alexander Shenkin
ashenkin at ufl.edu
Sun Dec 1 18:30:02 CET 2013
Thanks Carl. Yeah, I can get vectorized graphics out via
ggsave("temp.pdf") too. But I need to add the graphic to a word doc on
windows. Hence the desire to use wmf, which should induce a vector
format (shouldn't it?).
On 12/1/2013 10:39 AM, Carl Witthoft wrote:
> Off the top of my head, I'd suggest trying ggsave() with the extension
> ".svg" . I realize that SVG files are not recognized by some image display
> apps (Microsoft Windows I'm looking at YOU), but IMHO it's the best choice
> for vectorized images.
>
>
> Alexander Shenkin 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@
>
>> 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.
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-vectorize-plot-graphic-tp4681424p4681427.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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