Dear Listmembers,

I have a problem with maps lately that's driving me mad.
I am mapping Spain with islands in a little box in the left bottom corner.
When it comes to attributing colours the islands just end up white.
(plot(spain.canarias, col=colpal[c(51,52)] where 51 and 52 are the two
islands to be plotted in a box).

Anyone could please help me solve this problem?

spain.main <- spain[-c(51,52),]
spain.canarias <- spain[c(51,52),]
lb=7 #library(classInt)
colpal=brewer.pal(lb,"Yl0Rd")
oldpar <- par(no.readonly = FALSE)
bins =
seq(min(datav$PTFR[(datav$year==1960)&(datav$ORDER==11)]),max(datav$PTFR),
length= 4 )
colpal = brewer.pal(length(bins)-1,"YlOrRd")
lb = 4
par(fig=c(0,1,0,1), new=TRUE)
par(mar=c(0,0,0,0))
plot(spain.main, col=colpal[-c(51,52)])
legend("bottomright",fill=colpal,legend=paste(round(bins[-length(bins)],2)
,"-",round(bins[-1],2)),cex=1, bg="white")
par(fig=c(0.02,0.2,00.02,0.2), new=TRUE)
plot(spain.canarias, col=colpal[c(51,52)]
box()
text(0.1,0.95,"Colpal",cex=2)
text(rep(0.5,length(bins)-1), seq(0.1,0.8,length=length(bins)-1),
paste(bins[-length(bins)],"-",bins[-1]),cex=2)
text(0.5,0.95, "bins", cex=2)
bins = quantile(datav$PTFR[(datav$year==1960)&(datav$ORDER==11)],
seq(0,1,length=lb))
par(oldpar)



-- 
Alessandra Carioli

	[[alternative HTML version deleted]]

