[R] 300 dpi and eps:
jdnewmil at dcn.davis.ca.us
Wed Dec 15 21:23:59 CET 2010
You seem to be stuck on pixels and so forth. This should not be your concern.
You should (as Joshua said) specify the aspect ratio by indicating the real dimensions of your graphic in your call to postscript (), but that image won't become pixels until later, and your publisher will be the one to specify that. They should be providing guidance on what they want from you, but in general all you should need to know is the final presentation dimensions of your graphic.
Font sizes can be challenging if you specify a size of graphic that you intend to shrink later... it is simple though if you use final dimensions in your call to postscript().
"Aldi Kraja" <aldi at wustl.edu> wrote:
>Thank you Jeff for your advice,
>Maybe it was better my email subject to had been "high quality R graphs
>for publication" instead of "300 dpi and eps".
>a. In my latest response I was asking for any published paper/book
>(written by anybody in the R list) that describes how R handles vector
>graphs and raster graphs. Must be technical that Jeff did not like it.
>See the end of this email for a suggestion.
>But let's come to a more practical question:
>b. I was asking also how one handles in R the relation between page
>height, page width and pixels per unit.
>For example I find from the discussion list different responses:
>"EPS is perfectly acceptable in Word on a PC. The only proviso is that,
>as has been mentioned, Word will only display a low resolution bitmap
>"preview" of EPS image in the document on screen whilst editing. When
>printed to a postscript printer or converted to PDF via something like
>Distiller or via publishers' online submission tools, the figure will
>in the best possible quality." (Simpson).
>"For publication, it would be rare to want to use a bitmapped format
>such as jpg/png, pdf and eps are vector based formats and would be
>generally preferred over the above." (Schwartz)
>The practical response I found for point b) is the following (by Wiley
>responding to someone else question):
>"You have set the resolution, but you have not set the width/height.
>res argument generally controls how many pixels per inch (PPI which is
>often used similarly to DPI). So if you want 800 DPI and you want it to
>be a 4 x 4 inch graph something like: tiff(file = "temp.tiff", width =
>3200, height = 3200, units = "px", res = 800); plot(1:10, 1:10);
>dev.off(); This will make a file that is 3200 x 3200 pixels, with an
>resolution gives you 3200/800 = 4 inches. I would also recommend
>choosing some sort of compression or you will end up with a rather
>So I come back to R tiff() function and see this example:
>tiff(filename = "Rplot%03d.tif", width = 480, height = 480, units =
>"px", pointsize = 12, compression = c("none", "rle", "lzw", "jpeg",
>"zip"), that reminds also for the compression importance for large
>Following Wiley's example, if I use res=300 then I get
>inches for the size of the graph. So I wanted to see how Jeff or other
>listers handle these graph manipulations in R? Why width and height
>to be the same size based on these examples? What happens if the paper
>is 8.5i. x 11i., what do you do? What is the best advice how to produce
>in R graphs that can be acceptable for publications?
>There are many good examples in R News for papers that explain best
>different aspects of plotting, but I would suggest someone competent in
>this area write a great paper to explain technicalities of "how to
>create a high quality R graph for publication" if this does not exist.
>On 12/15/2010 10:24 AM, Jeff Newmiller wrote:
>> It is possible to embed a raster image inside eps, but AFAIK R does
>not do this. Other than that, your questions do not apply to eps.
>Rendering resolution only comes into play when you put it into a raster
>software (like photoshop) or print it.
>> Beyond that, we don't know what you are doing with the file after R
>generates it, and this is not a digital publishing mailing list so this
>isn't the right forum to continue this discussion.
>> "Aldi Kraja"<aldi at wustl.edu> wrote:
>>> I have come around several times from R to A. Illustrator, or A.
>>> photoshop, and between them with PowerPoint. It is possible that the
>>> last one I reported was from PowerPoint.
>>> So from your postings it was made clear that postscript plot from R
>>> produces a vector graph.
>>> Can someone recommend some paper that makes clear the relation and
>>> distinctions between vector and raster graphics, but especially with
>>> some practical examples in regard to what is the relation between
>>> (height and width) and dpi.
>>> For example if I plan to print high resolution graph in an image
>>> the A4 paper (8.5 inch x 11 inch) and from a journal it is required
>>> the graph needs to have 300 dpi or more how one tells to the R
>>> device to produce this setting?
>>> In A. photoshop for example I can define for a graph width in
>>> height in inches and resolution in pixels/inch color model CMYK and
>>> bit. How one works in R?
>>> Or one saves the graph from postscript function as eps or tiff and
>>> tell to the editor of the journal do whatever you want because I am
>>> done; I provided you already a vector graph that has infinite
>>> Thank you in advance,
>>> On 12/15/2010 3:52 AM, Rainer M Krug wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>> On 12/15/2010 09:31 AM, Philipp Pagel wrote:
>>>>>> Everything works fine to place them in a pdf file , or eps file,
>>>>>> when it comes to have a high quality of 300 dpi these graphs are
>>>>>> good. For example I open the eps file with Adobe Illustrator (AI)
>>>>>> and it shows that it is a 72dpi graph.
>>>>> This is simply not true: it's an eps and thus of essentually
>>>>> resolution for all practial purposes.
>>>> Just to clarify this: eps / ps are vector formats - i.e. it says in
>>>> file "draw a line from point x to point y". In contrast, bmp (and
>>>> jpg, png, tiff) are raster formats: in these formats save the
>>>> the line from point x to y.
>>>> Consequently, only raster formats have dpi ("dots" per inch).
>>>>> So your problem is not with
>>>>> the R-generated eps but somewhere downstream from that. Any
>>>>> postprocessing, conversion or editing?
>>>> Or in Adobe illustrator? It strikes me, that 72dpi is usually the
>>>> - --
>>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>>>> Biology, UCT), Dipl. Phys. (Germany)
>>>> Centre of Excellence for Invasion Biology
>>>> Natural Sciences Building
>>>> Office Suite 2039
>>>> Stellenbosch University
>>>> Main Campus, Merriman Avenue
>>>> South Africa
>>>> Tel: +33 - (0)9 53 10 27 44
>>>> Cell: +27 - (0)8 39 47 90 42
>>>> Fax (SA): +27 - (0)8 65 16 27 82
>>>> Fax (D) : +49 - (0)3 21 21 25 22 44
>>>> Fax (FR): +33 - (0)9 58 10 27 44
>>>> email: Rainer at krugs.de
>>>> Skype: RMkrug
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v1.4.10 (GNU/Linux)
>>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>>> -----END PGP SIGNATURE-----
>>>> R-help at r-project.org mailing list
>>>> PLEASE do read the posting guide
>>>> and provide commented, minimal, self-contained, reproducible code.
>>> R-help at r-project.org mailing list
>>> PLEASE do read the posting guide
>>> and provide commented, minimal, self-contained, reproducible code.
>> Jeff Newmiller The ..... ..... Go
>> DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#.
>> Live: OO#.. Dead: OO#..
>> Research Engineer (Solar/Batteries O.O#. #.O#. with
>> /Software/Embedded Controllers) .OO#. .OO#.
>> Sent from my phone. Please excuse my brevity.
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.
More information about the R-help