text_combined: peter cowan cowanpdgmailcom hello im trying write function produces main plotting region several square plots along right side ideally size right side plots scale height entire plot yet never overlap another secondary plot following two snippets get close however resize plot horizontally right side plots green squares get smaller whereas id like remain size seems answer lies setting layout width side plot column clever way havent able discover suggestions achieve effect improvements code welcome hopefully explanation makes goal clear also note real application function arbitrary numbers side plots thanks peter requiregrid gridnewpage lout1 gridlayoutnrow 1 ncol 2 widths unitc1 110 cnull snpc pushviewportviewportlayout lout1 w 08 h 08 pushviewportviewportlayoutposcol 1 gridrect popviewport pushviewportviewportlayoutposcol 2 lout2 gridlayoutnrow 10 ncol 1 heights unit1 snpc pushviewportviewportlayout lout2 fori seq0 1 lengthout 10 pushviewportviewporty width unit1 snpc height unit1 snpc gridrectgp gparcol 3 popviewport popviewport popviewport popviewport gridnewpage lout3 gridlayoutnrow 10 ncol 11 respect matrixcrep0 10 10 rep0 10 1 1 nrow 10 pushviewportviewportlayout lout3 w 08 h 08 pushviewportviewportlayoutposcol 110 gridrect popviewport pushviewportviewportlayoutposcol 11 fori seq0 1 lengthout 10 pushviewportviewporty width unit1 snpc height unit1 snpc gridrectgp gparcol 3 popviewport popviewport popviewport ______________________________________________ rhelprprojectorg mailing list httpsstatethzchmailmanlistinforhelp please read posting guide httpwwwrprojectorgpostingguidehtml provide commented minimal selfcontained reproducible code wed 06 aug 2008 011330 0700 r grid layout scaling viewport width based solely height