[R] monochrome mosaic plot in vcd package

Alan Cobo-Lewis alanc at umit.maine.edu
Sat Jan 28 15:42:30 CET 2006


Michael,

How about using grayscale shading and setting the background color (the gaps between the tiles) to middle gray?

--
Alan B. Cobo-Lewis, Ph.D.		(207) 581-3840 tel
Department of Psychology		(207) 581-6128 fax
University of Maine
Orono, ME 04469-5742     		alanc at maine.edu

http://www.umaine.edu/visualperception



r-help at stat.math.ethz.ch on Saturday, January 28, 2006 at 6:00 AM -0500 wrote:
>Content-Type: message/rfc822
>MIME-Version: 1.0
>
>From: Mike Townsley <uctqmkt at ucl.ac.uk>
>Precedence: list
>MIME-Version: 1.0
>To: r-help at stat.math.ethz.ch
>Date: Fri, 27 Jan 2006 11:28:10 +0000
>Message-ID: <5.2.1.1.0.20060127103000.00981fc0 at imap-server.ucl.ac.uk>
>Content-Type: text/plain; charset="us-ascii"; format=flowed
>Subject: [R] monochrome mosaic plot in vcd package
>Message: 5
>
>helpeRs,
>
>I have a nice looking mosaic plot in an article to be published 
>soon.  Sadly, the published version will be in black and white and so ruin 
>the advantage of the default shading scheme of tiles.
>
>What would readers suggest as an alternative shading scheme?  If I have a 
>black-and-white shading scheme graduated according to suitable cutoffs I 
>won't be able to tell positive from negative residuals.  The tile borders 
>can be changed of course, but I'm uncertain that is will be clear enough 
>for a reader.
>Another option may be to use a fill pattern of sloping lines with different 
>orientations for the sign and density for the magnitude.  The problem with 
>this option is I wouldn't know where to start to incorporate into a legend.
>
>The shading_binary function is no good as I would like the cells with 
>residuals less than absolute 2 to be different from other cells.  How would 
>readers of this list represent a mosaic plot so that it was easily 
>interpretable in monochrome?
>
>My data can be used as an example:
>
>
>library(vcd)
>library(MASS)
>
>term.1 <- gl(2,1,8, labels = LETTERS[1:2])
>term.2 <- gl(2,2,8, labels = LETTERS[3:4])
>term.3 <- gl(2,4,8, labels = LETTERS[5:6])
>
>cell.count <- c(72, 19, 5, 8, 117, 115, 81, 85)
>
>mosaic(loglm(formula = cell.count ~ term.1 + term.2 + term.3),
>        shade = TRUE, gp = shading_hcl, legend = TRUE,
>        labeling_args = list(rot_labels = rep(0,4)),
>        gp_args = list(lty = 1:2),legend_width = unit(0.2, "npc"))
>
>
>
>------------------------------------------------------------
>Dr Michael Townsley
>Senior Research Fellow
>Jill Dando Institute of Crime Science
>University College London
>Second Floor, Brook House
>London, WC1E 7HN
>
>Phone: 020 7679 0820
>Fax: 020 7679 0828
>Email: m.townsley at ucl.ac.uk
>




More information about the R-help mailing list