System: Linux kernel 2.6.15 Ubuntu dapper R version 2.5.1 ESS 5.2.11 on Emacs 21.4.1 ------------------------- Colleagues Having read the posts on producing perfect graphs in R, or using inkscape to edit R graphics output, I have a related question. Lately I am publishing in a journal that is very picky about their graphics formats. It is more efficient for me to get the final picky details of each graph done by our graphics department, who use Windows CorelDraw. The problem is that I have not yet been able to give them a vector graphics format that can be ungrouped in CorelDraw for editing. Bitmaps cannot be ungrouped <www.eatbywest.com/pub/vectorbitmap/>. The standard postscript that I am producing in R cannot be ungrouped either, and comes into CorelDraw looking fragmented. While I may be doing something odd in the production of my postscript files, they look fine elsewhere, and print well, so I don't think there is a problem. Can anyone tell me how to produce vector graphics in R that can be ungrouped for editing in CorelDraw? Best fishes Sam -- Sam McClatchie, Fisheries oceanographer Southwest Fisheries Science Center, NOAA, 8604 La Jolla Shores Drive La Jolla, CA 92037-1508, U.S.A. email <Sam.McClatchie at noaa.gov> work phone: 858 546 7083 Cellular: 858 752 8495 Research home page <http://www.fishocean.info> /\ ...>><xX(?> //// \\\\ <?)Xx><< ///// \\\\\\ ><(((?> >><(((?> ...>><xX(?>O<?)Xx><<
Sam McClatchie <Sam.McClatchie <at> noaa.gov> writes:> Can anyone tell me how to produce vector graphics in R that can be > ungrouped for editing in CorelDraw?Postscript should do. In theory, EMF will do too, but it quirky (at least with my version of CorelDraw). Dieter
Prof Brian Ripley
2007-Oct-19 07:36 UTC
[R] vector graphics/ ungroup and edit in CorelDraw
The R graphics model is low-level, and the problem is CorelDraw's limited capabilities (Adobe Illustrator seems to do rather better with postscript generated by R). The XFig and SVG drivers may produce output that is more easily editable, but ultimately the problem is that R graphics is done by precise placement of basic elements (lines, rectangles, polygons, text) and not designed to be post-processed. One of my students had some success generating SVG plots via RSvgDevice and editing with Inkscape: that has announced PDF import support, but I've not yet tried it. On Thu, 18 Oct 2007, Sam McClatchie wrote:> System: > Linux kernel 2.6.15 Ubuntu dapper > R version 2.5.1 > ESS 5.2.11 on Emacs 21.4.1 > ------------------------- > Colleagues > > Having read the posts on producing perfect graphs in R, or using > inkscape to edit R graphics output, I have a related question. > > Lately I am publishing in a journal that is very picky about their > graphics formats. It is more efficient for me to get the final picky > details of each graph done by our graphics department, who use Windows > CorelDraw. The problem is that I have not yet been able to give them a > vector graphics format that can be ungrouped in CorelDraw for editing. > Bitmaps cannot be ungrouped <www.eatbywest.com/pub/vectorbitmap/>. The > standard postscript that I am producing in R cannot be ungrouped either, > and comes into CorelDraw looking fragmented. While I may be doing > something odd in the production of my postscript files, they look fine > elsewhere, and print well, so I don't think there is a problem. > > Can anyone tell me how to produce vector graphics in R that can be > ungrouped for editing in CorelDraw? > > Best fishes > > Sam > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
System: 2.6.0 Linux kernel 2.6.15 Ubuntu dapper R version 2.5.1 ESS 5.2.11 on Emacs 21.4.1 Hello Brian Thanks for the tip. I upgraded to R 2.6.0., installed the package RSvgDevice, and modified my R-code to produce a vector graphics .svg file instead of postscript. The .svg file imported nicely into inkscape and I could work with all elements of the figure, which was what I wanted. The main problem that I have encountered is larger file size (my .svg file is twice the size of my .ps file), and because there is a lot of data in this figure, I have a 2MB file. I also found a description of how to configure LyX so you can use the .svg files directly instead of converting to .ps or .eps for LaTex output <http://wiki.lyx.org/Tips/UseInkscapeSVGImages>. This works nicely, and saves a step, but I still have to find a converter for svg to dpi or pdf. Best fishes Sam -- Sam McClatchie, Fisheries oceanographer Southwest Fisheries Science Center, NOAA, 8604 La Jolla Shores Drive La Jolla, CA 92037-1508, U.S.A. email <Sam.McClatchie at noaa.gov> work phone: 858 546 7083 Cellular: 858 752 8495 Research home page <http://www.fishocean.info> /\ ...>><xX(?> //// \\\\ <?)Xx><< ///// \\\\\\ ><(((?> >><(((?> ...>><xX(?>O<?)Xx><< ---------------------------- Prof Brian Ripley wrote: The R graphics model is low-level, and the problem is CorelDraw's limited capabilities (Adobe Illustrator seems to do rather better with postscript generated by R). The XFig and SVG drivers may produce output that is more easily editable, but ultimately the problem is that R graphics is done by precise placement of basic elements (lines, rectangles, polygons, text) and not designed to be post-processed. One of my students had some success generating SVG plots via RSvgDevice and editing with Inkscape: that has announced PDF import support, but I've not yet tried it. On Thu, 18 Oct 2007, Sam McClatchie wrote:> System: Linux kernel 2.6.15 Ubuntu dapper R version 2.5.1 ESS 5.2.11 > on Emacs 21.4.1 ------------------------- Colleagues > > Having read the posts on producing perfect graphs in R, or using > inkscape to edit R graphics output, I have a related question. > > Lately I am publishing in a journal that is very picky about their > graphics formats. It is more efficient for me to get the final picky > details of each graph done by our graphics department, who use > Windows CorelDraw. The problem is that I have not yet been able to > give them a vector graphics format that can be ungrouped in CorelDraw > for editing. Bitmaps cannot be ungrouped > <www.eatbywest.com/pub/vectorbitmap/>. The standard postscript that I > am producing in R cannot be ungrouped either, and comes into > CorelDraw looking fragmented. While I may be doing something odd in > the production of my postscript files, they look fine elsewhere, and > print well, so I don't think there is a problem. > > Can anyone tell me how to produce vector graphics in R that can be > ungrouped for editing in CorelDraw? > > Best fishes > > Sam > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
System: 2.6.0 Linux kernel 2.6.15 Ubuntu dapper R version 2.5.1 ESS 5.2.11 on Emacs 21.4.1 Colleagues I am still struggling to produce SVG file output in R. I initially started with RSvgDevice package. I produced a simple graphic from an example in the documentation and it imported into Inkscape fine and could be edited. However, my application involves plotting bathymetry and coastlines with the PBSmapping, and the plots contain a lot of data. Although I can still produce a file, and the screen graphic looks fine, Inkscape will not load the 1.8 MB file. I wasn't sure if the problem was with Inkscape or with the SVG file. I thought I'd try the Cairo package to see if RSvgDevice was failing because of the file size. I've install Cairo and used update.packages() to get the 1.3-5 version which has the SVG device driver. However, the Cairo.capabilities() function returns true for png, jpeg, and x11, but false for svg, ps, pdf and tiff. The error message returned from the call to Cairo_svg() is "Cairo compiled without svg device". So my question is: How do you to compile Cairo with the svg device? Do you have to do this from source with some --enabled switch? The install.packages() and update.packages() does not seem to do it? Best fishes Sam -- Sam McClatchie, Fisheries oceanographer Southwest Fisheries Science Center, NOAA, 8604 La Jolla Shores Drive La Jolla, CA 92037-1508, U.S.A. email <Sam.McClatchie at noaa.gov> work phone: 858 546 7083 Cellular: 858 752 8495 Research home page <http://www.fishocean.info> /\ ...>><xX(?> //// \\\\ <?)Xx><< ///// \\\\\\ ><(((?> >><(((?> ...>><xX(?>O<?)Xx><<
System: Linux kernel 2.6.22-14 Ubuntu 7.10 gutsy ESS 5.3.0 on Emacs 22.1.1 R version 2.6.0 Colleagues I would like to use the user contributed package "clim.pact". I'm having trouble with the dependency of "clim.pact" on "ncdf". Like others I am finding that R CMD INSTALL does not find the netcdf.h file, even when the directory (/usr/local/include) holding the netcdf.h file is passed to R CMD. Unless I misunderstood one of the postings there was an error related to this problem on the OSX build of the ncdf package <http://osdir.com/ml/lang.r.mac/2006-09/msg00012.html>. I've install the obvious netcdf packages and dependencies on ubuntu and the ncdump works fine. Has anyone solved this problem on linux? Best fishes Sam -- Sam McClatchie, Fisheries oceanographer Southwest Fisheries Science Center, NOAA, 8604 La Jolla Shores Drive La Jolla, CA 92037-1508, U.S.A. email <Sam.McClatchie at noaa.gov> work phone: 858 546 7083 Cellular: 858 752 8495 Research home page <http://www.fishocean.info> /\ ...>><xX(?> //// \\\\ <?)Xx><< ///// \\\\\\ ><(((?> >><(((?> ...>><xX(?>O<?)Xx><<