Grokbase Groups R r-help May 2002
FAQ
It seems that somehow I had come up with
odd values for the colors in xfig(), maybe
after an erroneus call. After
quiting and restarting R, xfig() works normally.

Agus

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es

On Wed, 29 May 2002, Prof Brian D Ripley wrote:

I don't think using colours in multiple xfig devices at the same time
will work. xfig needs colours declared in advance, and so the
internals have to work quite hard to keep track of the colours used and
post-process the files at the end of each page.

I can't see any good reason to do that, but if you need it
`patches accepted'.
On Wed, 29 May 2002, Agustin Lobo wrote:



I'm using (Linux version) xfig() within a function
and then simple matplot() and matline() plots.
Although I do not define any bg or fg default color,
sometimes all lines in the final fig file are green.

The same code works as (I) expected if I use
x11() or pdf().

This is what I'm doing:
I open 2 devs:
xfig()
dev.set(2)
layout(mat1)
xfig()
dev.set(3)
layout(mat)

And then use matplot and matline() several times
switching between devices with dev(3) and dev(4).
For example:

1.

modelo <- lm(y[,i] ~ -1+ x[,1])
dev.set(2)
plot(modelo)
title(paste("Degree 1 model:",nombre),outer=T)
dev.set(3)
matplot(1:36,y[,i],pch ,ylab="ND(nir,red)",xlab="10-day
period")
matlines(1:36,modelo$fitted.values)
title(paste("Polynomial model:",nombre))

Well, the fig file from device 3 is a graphic with black lines over white
bg, but the one from
device 2 is green lines over white bg.

2. If I define col="red" in the matplot for
device 3, then the graphic that I get has the red line (as expected),
but green axes and labels. All lines plotted with matlines on the
same graphic are also green. Instead, the fig file from device 2 is
now black over white!

3. Finally, if I use the fg=1 option,
xfig(fg=1)
dev.set(2)
layout(mat1)
xfig(fg=1)
dev.set(3)
layout(mat)

The behaviour is the reverse of the first example
and get 2 warnings:

Warning messages:
1: `mode(fg)' differs between new and previous!
==> NOT changing `fg' in: check.options(new = new, name.opt > > ".PostScript.Options", rese t = FALSE,
2: `mode(fg)' differs between new and previous!
==> NOT changing `fg' in: check.options(new = new, name.opt > > ".PostScript.Options", rese t = FALSE,

Should I fill a bug report or am I doing something wrong?

Thanks

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
--
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupr-help @
categoriesr
postedMay 29, '02 at 12:31p
activeMay 29, '02 at 2:13p
posts3
users2
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase