[R] HPGL or PCL plotting device? Or otherwise plotting plots

Thomas Levine _ at thomaslevine.com
Wed Jul 9 20:11:13 CEST 2014


Actually, this doesn't _quite_ do what I want;
I want different R colors (1, 2, 3, &c.) to select
different pens in HPGL ("SP1", "SP2", "SP3", &c.),
but the HPGL file I get selects only pen 1.

A hacky way to do this would be to generate
a few different postscript files for the different
colors on the plot, create the corresponding HPGL
files, edit the SP command in each of them, and
concatenate them. But maybe there's a better way?

On 09 Jul 13:32, Thomas Levine wrote:
> Oh it was easier than I thought.
> 
>   postscript('project-contracts.ps')
>   hist(log(projects$n.contracts))
>   dev.off()
> 
> Then run this from the shell.
> 
>   pstoedit -f plot-hpgl project-contracts.ps project-contracts.hpgl
> 
> And send it to the plotter.
> 
> On 09 Jul 13:10, Thomas Levine wrote:
> > Hi,
> > 
> > I want to print plots on a Roland DXY-1100 plotter.
> > How can I do this from R? I think the easiest thing
> > would be a graphics device for Printer Command
> > Language or Hewlett-Packard Graphics Language, but
> > I haven't managed to find any of those.
> > 
> > Thanks
> > 
> > Tom



More information about the R-help mailing list