Skip to content
Prev 255578 / 398506 Next

fonts in mosaic

On Apr 2, 2011, at 6:02 AM, Erich Neuwirth wrote:

            
Make one with your desired values:

gpCon <- gpar(fontfamily="Consolas", fontsize=8)

Then pass it to the appropriate argument. I don't have a Windows  
device nor a copy of that font but the following changes several of  
the defaults on a Mac if I use "Times" instead of"Consolas".

mosaic(Titanic, main="Test of gpar",
         gp_varnames=gpCon,
         gp_labels=gpCon )

You _might_ be able to change the defaults with grid:::set.gpar()  or  
with grid:::grid.Call("L_setGPar", list(...)) but my efforts did not  
succeed (unless success is measured by undesirable side-effects on  
one's system.) Neither of those functions is "exposed", so it would  
appear that their use is not recommended (or documented). I was able  
to change the internal values returned by get.gpar() but passing them  
on to mosaic() did not succeed.