Skip to content
Prev 176357 / 398502 Next

problem with lattice tiff or bitmap: character size and color

Thank you Professor Brian Ripley for very helpful comments.

Using type="tiff24nc" in bitmap mostly solved my problems. However, some
complicated figures still come out in greyscale with bitmap even when
using type="tiff24nc". The tiff function preserves the color but reduces
the character size as before. The good news is that dev2bitmap from X11
gives the correct figure. The newtest function below demonstrates this
behavior. I do have the latest R for my system
(R-core-2.8.1-8.fc10.x86_64).

Another question, is it possible to use lzw compression other than
type"tifflzw"? (the figures I produced with type="tiff24nc" are about 200
Mb. When opened and saved in photoshop with lzw compression they become
about 2 Mb).

Thank you

Regards
Einar Arnason
res=1200, pointsize=10, type="tiff24nc",bg="white") # produces required
figure

`newtest` <-
  function(tiff=F, bitmap=F)
  {
### requires states
### states <- data.frame(state.x77, state.name = dimnames(state.x77)[[1]],
state.region = state.region)
    if(bitmap)
      bitmap("bitmaptest.tiff", width=17.15, height=17.15, units="cm",
res=1200, pointsize=10, type="tiff24nc",bg="white")
    if(tiff)
      tiff(file="tifftest.tiff",width=17.15,height=17.15,units="cm",
res=1200, pointsize=10, compression = "lzw")
###      tiff(file="tifftest.tiff",width=17.15,height=17.15,units="cm",
res=72, pointsize=10, compression = "lzw")
    foo <- xyplot(Murder ~ Population | state.region, data = states,
                groups = state.name,
                panel = function(x, y, subscripts, groups)
                ltext(x = x, y = y, label = groups[subscripts], cex=0.5,
                      fontfamily = "HersheySans"))
    plot(foo,position=c(0,0,0.33,1))
    plot(foo,position=c(0.33,0,0.66,1), newpage=FALSE)
    plot(foo,position=c(0.66,0,0.99,1), newpage=FALSE)
    if(bitmap)
      dev.off()
    if(tiff)
      dev.off()
  }
Message-ID: <1fbd55e79a3233e85ebf02fdcfec8cc0.squirrel@webmail.hi.is>
In-Reply-To: <alpine.LFD.2.00.0904051645420.11429@gannet.stats.ox.ac.uk>