This gallery tracks the ongoing port of grid examples into grrr scene
graphs, shown as direct side-by-side comparisons.
# Rebuild all SVGs and status CSV.
source ( file.path ( pkg_root , "examples" , "examples_grid_grrr.R" ) )
Coverage Snapshot
tab <- as.data.frame ( table ( status $ state ) , stringsAsFactors = FALSE )
names ( tab ) <- c ( "state" , "count" )
tab $ pct <- sprintf ( "%.1f%%" , 100 * tab $ count / sum ( tab $ count ) )
knitr :: kable ( tab , align = c ( "l" , "r" , "r" ) )
partial
3
17.6%
ported
14
82.4%
Click any pane to open it in a lightbox.
Full Side-by-Side Gallery
status $ grrr_path <- file.path ( svg_dir , paste0 ( status $ example , ".svg" ) )
status $ svglite_path <- file.path ( svglite_dir , paste0 ( status $ example , ".svg" ) )
status <- status [ file.exists ( status $ grrr_path ) & file.exists ( status $ svglite_path ) , , drop = FALSE ]
status <- status [ order ( status $ example ) , , drop = FALSE ]
cat ( "<section style='display:grid;grid-template-columns:1fr;gap:12px;align-items:start;'>\n" )
for ( i in seq_len ( nrow ( status ) ) ) {
render_card ( status [ i , , drop = FALSE ] )
}
Circle via point primitive with large size
Dashed support and segment colours should match
grid + svglite
centre top-left bottom-right rotated
45 rotated
90
centre top-left bottom-right rotated
45 rotated
90
grrr
centre top-left bottom-right rotated
45 rotated
90
centre top-left bottom-right rotated
45 rotated
90
Justification + rotation covered
Alpha per polygon not yet wired per row
Grouped polylines mapped to path
grid + svglite
Left
panel Right
panel
grrr
Left
panel Right
panel
Nested panel composition via grab_bag + vp
grid + svglite
(1,1) (1,2) (1,3) (2,1) (2,2) (2,3)
(1,1) (1,2) (1,3) (2,1) (2,2) (2,3)
grrr
(1,1) (1,2) (1,3) (2,1) (2,2) (2,3)
(1,1) (1,2) (1,3) (2,1) (2,2) (2,3)
vp_grid parity check
grid + svglite
solid dashed dotted dotdash longdash twodash
solid dashed dotted dotdash longdash twodash
grrr
solid
(lwd 0.4) dashed
(lwd 0.6) dotted
(lwd 0.8) dotdash
(lwd 1.0) longdash
(lwd 1.2) twodash
(lwd 1.4)
solid
(lwd 0.4) dashed
(lwd 0.6) dotted
(lwd 0.8) dotdash
(lwd 1.0) longdash
(lwd 1.2) twodash
(lwd 1.4)
Per-row linetype and linewidth now applied
grid + svglite
The
quick brown fox — plain The
quick brown fox — bold The
quick brown fox — italic The
quick brown fox — bold.italic
The
quick brown fox — plain The
quick brown fox — bold The
quick brown fox — italic The
quick brown fox — bold.italic
grrr
The
quick brown fox — plain The
quick brown fox — bold The
quick brown fox — italic The
quick brown fox — bold.italic
The
quick brown fox — plain The
quick brown fox — bold The
quick brown fox — italic The
quick brown fox — bold.italic
Size + fontface supported
Alpha via group aesthetics
grrr
TODO:
arrowheads are not implemented
TODO:
arrowheads are not implemented
Arrows downgraded to plain segments
grid + svglite
Raster
image
Raster
image
grrr
Raster
image
Raster
image
Raster primitive with colorful HCL matrix captured via
ragg::agg_capture()
grid + svglite
Clipped
to viewport
Clipped
to viewport
grrr
Clipped
to viewport
Clipped
to viewport
Clip behavior parity check
grid + svglite
minus intersection union xor
minus intersection union xor
grrr
minus intersection union xor TODO:
boolean polyclip operations are not implemented
minus intersection union xor TODO:
boolean polyclip operations are not implemented
No polygon boolean ops yet; overlap visualization only
grid + svglite
gTree
example
grrr
gTree
example gTree
traversal: rect/circle/text/lines/polyline/polygon + nested vp
gTree
example gTree
traversal: rect/circle/text/lines/polyline/polygon + nested vp
Traversal now handles rect/circle/text/lines/polyline/polygon and basic
nested viewport
grid + svglite
4pt 6pt 8pt 10pt 12pt 16pt 20pt 4pt
/ lwd 0.25 6pt
/ lwd 0.50 8pt
/ lwd 0.75 10pt
/ lwd 1.00 12pt
/ lwd 1.50 16pt
/ lwd 2.00 20pt
/ lwd 2.50
4pt 6pt 8pt 10pt 12pt 16pt 20pt 4pt
/ lwd 0.25 6pt
/ lwd 0.50 8pt
/ lwd 0.75 10pt
/ lwd 1.00 12pt
/ lwd 1.50 16pt
/ lwd 2.00 20pt
/ lwd 2.50
grrr
4pt 6pt 8pt 10pt 12pt 16pt 20pt 4pt
/ lwd 0.25 6pt
/ lwd 0.50 8pt
/ lwd 0.75 10pt
/ lwd 1.00 12pt
/ lwd 1.50 16pt
/ lwd 2.00 20pt
/ lwd 2.50
4pt 6pt 8pt 10pt 12pt 16pt 20pt 4pt
/ lwd 0.25 6pt
/ lwd 0.50 8pt
/ lwd 0.75 10pt
/ lwd 1.00 12pt
/ lwd 1.50 16pt
/ lwd 2.00 20pt
/ lwd 2.50
Useful regression check for point scaling
grid + svglite
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
grrr
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Red
outlines indicate pch values without direct shape mapping
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Red
outlines indicate pch values without direct shape mapping
Only a subset of base-R pch values map cleanly
Remaining Partial Ports
partials <- status [ status $ state != "ported" , c ( "example" , "state" , "note" ) ]
if ( nrow ( partials ) == 0 ) {
cat ( "All examples are currently marked as ported.\n" )
} else {
knitr :: kable ( partials , align = c ( "l" , "l" , "l" ) )
}
11
11_arrows
partial
Arrows downgraded to plain segments
14
14_polyclip
partial
No polygon boolean ops yet; overlap visualization
only
17
17_pointshapes
partial
Only a subset of base-R pch values map cleanly