[R] vector graphics

2015-10-06 Thread Ivan Calandra

Dear useRs,

A colleague of mine is having a problem with graphic devices. The goal 
is to save into a vector graphic format that can be edited with 
Illustrator CS4.


On my Mac (Snow Leopard), I use RSvgDevice::devSVG() and it works fine.
But on her Windows Vista computer, I cannot find an alternative.> 
sessionInfo()

R version 3.2.2 (2015-08-14)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows Vista (build 6002) Service Pack 2

I have tried:
- pdf(): I cannot dissociate the graphical elements (no problem with text)
- cairo_pdf(): the text is replaced by symbols
- cairo_ps(): fine except that the text is not text but object (it is 
then a bit troublesome, as any text modification requires the text to be 
completely rewritten)
- svg(): the graphic is completely screwed up (it seems to be a scaling 
problem, with symbols and letters all very large and superposed)
- RSvgDevice cannot be installed on the Windows machine, neither as 
binary nor from source.


Is there any other device that could work? If not, is it a matter of 
settings? So, basically, what can I do?


Thank you in advance,
Ivan

--
Ivan Calandra, PhD
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr
https://www.researchgate.net/profile/Ivan_Calandra

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] vector graphics

2015-10-06 Thread Adams, Jean
Perhaps the discussion at this link will be helpful ...
http://stackoverflow.com/questions/9555889/producing-a-vector-graphics-image-i-e-metafile-in-r-suitable-for-printing-in

Jean

On Tue, Oct 6, 2015 at 9:42 AM, Ivan Calandra 
wrote:

> Dear useRs,
>
> A colleague of mine is having a problem with graphic devices. The goal is
> to save into a vector graphic format that can be edited with Illustrator
> CS4.
>
> On my Mac (Snow Leopard), I use RSvgDevice::devSVG() and it works fine.
> But on her Windows Vista computer, I cannot find an alternative.>
> sessionInfo()
> R version 3.2.2 (2015-08-14)
> Platform: i386-w64-mingw32/i386 (32-bit)
> Running under: Windows Vista (build 6002) Service Pack 2
>
> I have tried:
> - pdf(): I cannot dissociate the graphical elements (no problem with text)
> - cairo_pdf(): the text is replaced by symbols
> - cairo_ps(): fine except that the text is not text but object (it is then
> a bit troublesome, as any text modification requires the text to be
> completely rewritten)
> - svg(): the graphic is completely screwed up (it seems to be a scaling
> problem, with symbols and letters all very large and superposed)
> - RSvgDevice cannot be installed on the Windows machine, neither as binary
> nor from source.
>
> Is there any other device that could work? If not, is it a matter of
> settings? So, basically, what can I do?
>
> Thank you in advance,
> Ivan
>
> --
> Ivan Calandra, PhD
> University of Reims Champagne-Ardenne
> GEGENAA - EA 3795
> CREA - 2 esplanade Roland Garros
> 51100 Reims, France
> +33(0)3 26 77 36 89
> ivan.calan...@univ-reims.fr
> https://www.researchgate.net/profile/Ivan_Calandra
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] vector graphics

2015-10-07 Thread Ivan Calandra

Thanks Jean for the tip.
I'll try postscript() and devEMF::emf() and see if it works.
Still, it's very complicated to export vector graphics in R...

Ivan

--
Ivan Calandra, PhD
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr
https://www.researchgate.net/profile/Ivan_Calandra

Le 07/10/15 00:16, Adams, Jean a écrit :
Perhaps the discussion at this link will be helpful ... 
http://stackoverflow.com/questions/9555889/producing-a-vector-graphics-image-i-e-metafile-in-r-suitable-for-printing-in


Jean

On Tue, Oct 6, 2015 at 9:42 AM, Ivan Calandra 
mailto:ivan.calan...@univ-reims.fr>> wrote:


Dear useRs,

A colleague of mine is having a problem with graphic devices. The
goal is to save into a vector graphic format that can be edited
with Illustrator CS4.

On my Mac (Snow Leopard), I use RSvgDevice::devSVG() and it works
fine.
But on her Windows Vista computer, I cannot find an alternative.>
sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows Vista (build 6002) Service Pack 2

I have tried:
- pdf(): I cannot dissociate the graphical elements (no problem
with text)
- cairo_pdf(): the text is replaced by symbols
- cairo_ps(): fine except that the text is not text but object (it
is then a bit troublesome, as any text modification requires the
text to be completely rewritten)
- svg(): the graphic is completely screwed up (it seems to be a
scaling problem, with symbols and letters all very large and
superposed)
- RSvgDevice cannot be installed on the Windows machine, neither
as binary nor from source.

Is there any other device that could work? If not, is it a matter
of settings? So, basically, what can I do?

Thank you in advance,
Ivan

-- 
Ivan Calandra, PhD

University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr 
https://www.researchgate.net/profile/Ivan_Calandra

__
R-help@r-project.org  mailing list --
To UNSUBSCRIBE and more, see
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.




__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Re: [R] vector graphics

2015-10-07 Thread Ivan Calandra
For the record, it seems that devEMF::emf() works fine on the Windows 
Vista SP2 machine with R3.2.2 and Illustrator CS4: the text is 
recognized as text and every point/line can be dissociated.


Ivan

--
Ivan Calandra, PhD
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr
https://www.researchgate.net/profile/Ivan_Calandra

Le 07/10/15 10:05, Ivan Calandra a écrit :

Thanks Jean for the tip.
I'll try postscript() and devEMF::emf() and see if it works.
Still, it's very complicated to export vector graphics in R...

Ivan

--
Ivan Calandra, PhD
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr
https://www.researchgate.net/profile/Ivan_Calandra

Le 07/10/15 00:16, Adams, Jean a écrit :
Perhaps the discussion at this link will be helpful ... 
http://stackoverflow.com/questions/9555889/producing-a-vector-graphics-image-i-e-metafile-in-r-suitable-for-printing-in


Jean

On Tue, Oct 6, 2015 at 9:42 AM, Ivan Calandra 
mailto:ivan.calan...@univ-reims.fr>> 
wrote:


Dear useRs,

A colleague of mine is having a problem with graphic devices. The
goal is to save into a vector graphic format that can be edited
with Illustrator CS4.

On my Mac (Snow Leopard), I use RSvgDevice::devSVG() and it works
fine.
But on her Windows Vista computer, I cannot find an alternative.>
sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows Vista (build 6002) Service Pack 2

I have tried:
- pdf(): I cannot dissociate the graphical elements (no problem
with text)
- cairo_pdf(): the text is replaced by symbols
- cairo_ps(): fine except that the text is not text but object (it
is then a bit troublesome, as any text modification requires the
text to be completely rewritten)
- svg(): the graphic is completely screwed up (it seems to be a
scaling problem, with symbols and letters all very large and
superposed)
- RSvgDevice cannot be installed on the Windows machine, neither
as binary nor from source.

Is there any other device that could work? If not, is it a matter
of settings? So, basically, what can I do?

Thank you in advance,
Ivan

-- Ivan Calandra, PhD
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr 
https://www.researchgate.net/profile/Ivan_Calandra

__
R-help@r-project.org  mailing list --
To UNSUBSCRIBE and more, see
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.






__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

[R] vector graphics/ SVG plots via RSvgDevice

2007-10-24 Thread Sam McClatchie
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 . 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 <[EMAIL PROTECTED]>
work phone: 858 546 7083
Cellular:  858 752 8495
Research home page 

/\
   ...>>
  
<°)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 
> . 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,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@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.


[R] vector graphics/ SVG plots via RSvgDevice

2007-11-05 Thread Sam McClatchie
System:
Linux Ubuntu 7.10 Gibbon
kernel  2.6.22-14-generic
Emacs ver. 22.1.1
ESS ver. 5.3.0
R version 2.6.0 (2007-10-03)


Colleagues

This is a follow-up note to my earlier post under this header, giving my
solution.

First, with some trepidation I upgraded my ubuntu distro, and this time
did a full reinstall, so I did not break my system, as I have done in
the past.

Then I tried to get the contributed package Cairo to work, but still had
issues with libraries that I failed to fix. However, the upgrade had
other advantages. Thanks for the push, Brian.

I went back to RSvgDevice and produced nice SVG plots that imported into
Inkscape and could be edited to meet all the fussy journal requirements
for my figures. However, both the Inkscape and the plain SVG files did
not display properly on conversion from LyX to DVI or PDF, although they
look fine in LyX. My work around is to export a bitmap from Inkscape and
use this in LyX. Export creates a PNG file, and an advantage here is
that the graphics file size reduced from  2.1 MB for the SVG file to 320
KB for the PNG file.  This is good where the journal wants your graphics
files separately and may not be  able to deal with SVG files, or very
large files.

I have one caveat. It seems to me that RSvgDevice had problems writing
to file when the data were unreasonably voluminous. I produced another
graphic using bathymetry and coastlines recommended in the PBSmapping
package. These files are high resolution and large (85 and 64 MB
respectively). The plot took too long and the resulting SVG could not be
loaded by Inkscape, nor converted to EPS using Image Magick (suggesting
failure somewhere?).  I'm not criticizing the packages here, just making
an observation. I can either create smaller bathymetry and coastline
files, or use the big linux beast downstairs.

Best fishes

Sam

-- 
Sam McClatchie (Fisheries oceanographer, SWFSC, NOAA)
& Elena Turin (Internal controls accountant, UCSD)
work: SWFSC, 8604 La Jolla Shores Drive, La Jolla, CA 92037-1508, USA
home: 12723 Salmon River Rd, San Diego, CA 92129, USA
web: 
Sam's cell: 858 752 8495
Elena's cell: 858 752 8689
  /\
   >>
   /// \\\
   
 ///  <%)Xx><<
/  \\
  ><(((@>
><(((%>  ..>>O<<

__
R-help@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.


[R] vector graphics/ ungroup and edit in CorelDraw

2007-10-18 Thread Sam McClatchie
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 . 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 <[EMAIL PROTECTED]>
work phone: 858 546 7083
Cellular:  858 752 8495
Research home page 

   /\
  ...>>
 
   <°)Xx><<
  /  \\
><(((°>
  >><(((°>   ...>>O<°)Xx><<

__
R-help@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.


Re: [R] vector graphics/ ungroup and edit in CorelDraw

2007-10-19 Thread Prof Brian Ripley
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 . 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,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@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.


Re: [R] vector graphics/ ungroup and edit in CorelDraw

2007-10-18 Thread Dieter Menne
Sam McClatchie  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

__
R-help@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.