Skip to content
Prev 220655 / 398500 Next

Finding different hues for a mosaic plot compatible with grayscale printing

Dear Colleagues,
Thanks for that JIm, but It strikes me that printing the residual  
values in the cells might be a simpler way of communicating the  
direction of each cell.
I can get the residuals printed via the labeling_values commands in  
mosaic, but I cannot seem to *combine* this with labeling_borders  
commands that I'd like to use to modify the rotation, font size and  
contents of variable names and labels.
The following mosaic command draws the plot with the labeling I'd like.

 >mosaic(~social_class+ctax_agg_scaled, pop=FALSE, shade=TRUE,  
main="The Liberals Carbon Tax Or Green Shift Would Hurt The Canadian  
Economy By EGP Class Category", main_gp=gpar(fontsize=16),  
gp=shading_hcl(CST21$observed, CST21$expected, ASR21, df=12,  
h=c(260,0), c=c(100,0), l=c(90,50), interpolate=c(1,2,3,4)),  
labeling_args=list(labels=TRUE, rot_labels=c(25,0,0,25),  
gp_labels=gpar(fontsize=7), just_labels="center",  
offset_labels=c(1,0,0,4), offset_varnames=c(2,0,0,4),  
set_varnames=c(ctax_agg_scaled="The Liberal Green Shift Or Carbon Tax  
Would Hurt The Canadian Economy", social_class="EGP Class Category")))

And when I take out the labeling_borders commands and insert the  
following,
 >labeling=labeling_values(value_type=c("residuals"), suppress=0)

then I do get the residuals printed, but the labels are unattractive.

How do I combine labeling_borders and labeling_values commands in one  
command.

Yours, Simon Kiss
On 12-May-10, at 2:42 PM, Jim Lemon wrote:

            
*********************************
Simon J. Kiss, PhD
SSHRC and DAAD Post-Doctoral Fellow
John F. Kennedy Institute of North America Studies
Free University of Berlin
Lansstra?e 7-9
14195 Berlin, Germany
Cell: +49 (0)1525-300-2812,
Web: http://www.jfki.fu-berlin.de/index.html