pixfigure(paths[1:2], caption = c("Night sky over the mountains", "Though the dense rainforest"), link = FALSE)
-
-
+
+
diff --git a/docs/articles/pixfigure.html b/docs/articles/pixfigure.html index 20d1749..ea67310 100644 --- a/docs/articles/pixfigure.html +++ b/docs/articles/pixfigure.html @@ -20,7 +20,7 @@ - +
@@ -92,8 +92,8 @@
pixfigure(paths[1])
pixfigure(paths[1], caption = "Night sky over the mountains")
pixfigure(paths[1:2], link = FALSE)
By setting this to a character vector, you can add custom links.
@@ -133,16 +133,16 @@
pixfigure(paths[1:2], link = c("https://en.wikipedia.org/wiki/Milky_Way", "https://en.wikipedia.org/wiki/Rainforest"))
pixfigure(paths[1], w = "400px")
pixfigure(paths[3], h = "400px", caption = "shark")
pixfigure(paths[1], h = "600px")
Resize the width of the page to see the effect of fit="cover"
. The image scales within it’s frame rather than shrink. Explore css property object-fit for more details, for example, on w3schools.
pixfigure(paths[1], h = "400px", w = "400px", position = "left")
pixfigure(paths[1], h = "400px", w = "400px", position = "right")
Here is a youtube video that discusses fit and position.
@@ -207,8 +207,8 @@
pixfigure(paths, caption = c("Night sky over the mountains", "Walking through dense woodland", "Out in the open seas"), h = "200px", w = "250px", position = "left")
pixfigure("images/pexels-photo-3126574.jpg", h = "300px")
pixgallery(paths_a)
captions <- c("night", "forest", "shark", "coconut trees", "flowers", "field", "misty", "leaves", "sunset", "mountains", "swamp", "rainstorm", "leaves", "beach", "leopard", "sunflower")
pixgallery(paths_a, caption = captions)
Images without captions can be set as NA.
@@ -153,16 +153,16 @@
pixgallery(paths_a[1:4], caption = c("night", "forest", NA, "coconut trees"))
pixgallery(paths_a[1], caption = "night")
pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "top")
pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "center")
pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "bottom")
pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "below")
caption_halign
options are left
, center
or right
.
pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "center", caption_halign = "center")
pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "below", caption_halign = "center")
pixgallery(paths_a[1:4], link = FALSE)
By setting this to a character vector, you can add custom links.
@@ -236,8 +236,8 @@
pixgallery(paths_a[1:4], link = c("https://en.wikipedia.org/wiki/Milky_Way", "https://en.wikipedia.org/wiki/Rainforest", "https://en.wikipedia.org/wiki/Shark", "https://en.wikipedia.org/wiki/Hawaii"))
pixgallery(paths_a, h = "50px")
pixgallery(paths_b, w = "100px")
pixgallery(paths_a[1:8], gap = "20px")
pixgallery(paths_a, gap = "0", w = "40px")
pixgallery(paths_a, w = "100px", border_radius = "10px")
pixgallery(paths_a, w = "50px", shuffle = TRUE)
pixgallery(paths_a, w = "50px", shuffle = TRUE, caption = c("night", "forest", "shark", "coconut trees", "flowers", "field", "misty", "leaves", "sunset", "mountains", "swamp", "rainstorm", "leaves", "beach", "leopard", "sunflower"))
pixgallery(paths)
pixgallery(paths_a[1:8], layout = "fixed")
pixgallery(paths_a[1:8], layout = "fixed", caption = captions[1:8], caption_valign = "center", caption_halign = "center", border_radius = "50%", gap = "10px")
pixgallery(paths_b, layout = "mosaic")
pixgallery(paths_a, layout = "mosaic", caption = captions, caption_valign = "bottom", h = "100px", w = "100px")
pixgallery(paths_a, layout = "mosaic", caption = captions, caption_valign = "below", h = "100px", w = "100px", border_radius = "5px", shuffle = TRUE)
pixgallery(paths_b, layout = "masonry")
pixgallery(paths_a, layout = "masonry", caption = captions, caption_valign = "bottom", w = "100px")
pixgallery(paths_a, layout = "masonry", caption = captions, caption_valign = "below", w = "100px", border_radius = "5px", shuffle = TRUE)
pixgallery(paths_b, layout = "justified")
pixgallery(paths_a, layout = "justified", caption = captions, caption_valign = "bottom", h = "100px")
pixgallery(paths_a, layout = "justified", caption = captions, caption_valign = "below", h = "100px", border_radius = "5px", shuffle = TRUE)
pixgallery(paths_b, layout = "elastic")
pixgallery(paths_a, layout = "elastic", gap = "0", h = "50px")
pixgallery(paths_a, layout = "elastic", border_radius = "5px", caption = captions)
Works better when there are more than a handful of images.
@@ -659,8 +659,8 @@
pixgallery(paths_a[1:4], layout = "elastic")
pixgallery(paths_b, layout = "rhombus")
pixgallery(paths_a, layout = "rhombus", gap = "0px", caption = captions, shuffle = TRUE)
pixgallery(paths, h = "300px")