[R] Fighting with GDD & lwd

vittorio vdemart1 at tin.it
Sun Jun 25 23:32:42 CEST 2006


I succeeded in compiling and installing the GDD package under my FreeBSD 6.1 
box after eliminating 

ifdef DEBUG
   PKG_CFLAGS+=-DJGD_DEBUG
endif

in Makevars.in

Now, with the following code

..............................................
grafico1<- function() {
  plot(1:length(tabella[,1]),tabella[,2],ylim=c(Ymin,Ymax),type="h", 
    lwd=6,col="red",main=paste("TEMPERATURE MEDIE GIORNALIERE\nMESE DI", 
toupper(format(ierid,"%B")),sep=" "),
    col.main="dark blue", xlab="Giorni del mese",ylab="°C", 
col.lab="blue",axes=FALSE)
  lines(1:length(tabella[,1]),tabella[,3],type="l",lwd=2,col="dark green") 
  legend(1,Ymax,c(substring(FineMeseAnnoPrima,1,4),substring(Ieri,1,4)), 
col=c("dark green","red"),lty=c(1,1),lwd=4,bty="n")
  axis(1,at=1:length(tabella[,1]),lab=1:length(tabella[,1]),col="brown4", 
col.axis="brown4")
  axis(2,at=seq(Ymin,Ymax,by=2),lab=seq(Ymin,Ymax,by=2), 
col="brown4",col.axis="brown4",las=2)
  axis(4,at=seq(Ymin,Ymax,by=2),lab=seq(Ymin,Ymax,by=2), 
col="brown4",col.axis="brown4",las=2)
  grid(NA,ny=NULL,col="pink",lty="dotted")
	}
#
#
GDD(file="temperature",type="png",width=600,height=480)
grafico1()
dev.off()

 While under X11 grafico1() produces  *** thick ***  red histograms  due to 
the lwd=6 (and col="red", of course) option in the plot command, under GDD the 
png (but also gif and jpg) results in a graph with very thin histograms as if 
the lwd option doesn't exert any influence at all (I checked also with 
lwd=160 to no avail).

What should I do?

Ciao
Vittorio



More information about the R-help mailing list