diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png index 2f95b59..e118096 100644 Binary files a/apple-touch-icon-120x120.png and b/apple-touch-icon-120x120.png differ diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png index 6daaee7..1e2455e 100644 Binary files a/apple-touch-icon-152x152.png and b/apple-touch-icon-152x152.png differ diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png index f622cfe..769ccb1 100644 Binary files a/apple-touch-icon-180x180.png and b/apple-touch-icon-180x180.png differ diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png index 29461e8..d71163d 100644 Binary files a/apple-touch-icon-60x60.png and b/apple-touch-icon-60x60.png differ diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png index 0b6414d..781efdb 100644 Binary files a/apple-touch-icon-76x76.png and b/apple-touch-icon-76x76.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png index 6ae8a18..4ed937b 100644 Binary files a/apple-touch-icon.png and b/apple-touch-icon.png differ diff --git a/favicon-16x16.png b/favicon-16x16.png index 1b97aec..c027a77 100644 Binary files a/favicon-16x16.png and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png index 06d32f8..64a0528 100644 Binary files a/favicon-32x32.png and b/favicon-32x32.png differ diff --git a/news/index.html b/news/index.html index 7900bf1..7006621 100644 --- a/news/index.html +++ b/news/index.html @@ -46,7 +46,7 @@

ggmagnify 0.4.1

-

ggmagnify 0.4.0

diff --git a/pkgdown.yml b/pkgdown.yml index bbd3b31..11da03b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.0.9 pkgdown_sha: ~ articles: {} -last_built: 2024-06-24T05:55Z +last_built: 2024-06-24T06:17Z urls: reference: https://hughjonesd.github.io/ggmagnify/reference article: https://hughjonesd.github.io/ggmagnify/articles diff --git a/reference/index.html b/reference/index.html index a38a5ed..d58f15d 100644 --- a/reference/index.html +++ b/reference/index.html @@ -71,12 +71,7 @@

All functionsinset_blanks() - -
Default elements to blank in the ggmagnify inset
-
- - inset_theme() + inset_theme() inset_blanks()
Create a theme suitable for an inset ggplot
diff --git a/reference/inset_theme-1.png b/reference/inset_theme-1.png index e098b52..4225dc1 100644 Binary files a/reference/inset_theme-1.png and b/reference/inset_theme-1.png differ diff --git a/reference/inset_theme.html b/reference/inset_theme.html index b1edb7f..70192f0 100644 --- a/reference/inset_theme.html +++ b/reference/inset_theme.html @@ -1,7 +1,9 @@ Create a theme suitable for an inset ggplot — inset_theme • ggmagnify @@ -49,16 +51,19 @@

Use inset_theme() to add a suitable theme to a manually-created inset -plot.

+plot. Use inset_blanks() to customize the default list of elements to +blank in the inset.

Usage

inset_theme(
-  blank = inset_blanks(axes = axes),
-  axes,
+  blank = inset_blanks(axes = axes),
+  axes = c("", "x", "y", "xy"),
   margin = if (axes == "") 0 else 8
-)
+) + +inset_blanks(..., axes = c("", "x", "y", "xy"))

@@ -75,12 +80,19 @@

Argumentsggplot2::theme().

+ +
...
+

Character vector of extra elements to blank.

+

Value

-

A ggplot theme object

+

inset_theme() returns a ggplot theme object. inset_blanks()

+ + +

returns a character vector of theme element names.

@@ -91,7 +103,8 @@

Examplesfrom <- list(2.5, 3.5, 6, 7) to <- list(4, 6, 5, 7) -inset <- ggp + geom_density2d() + inset_theme(axes = "") +blanks <- inset_blanks("panel.grid") +inset <- ggp + geom_density2d() + inset_theme(axes = "", blank = blanks) ggp + geom_magnify(from = from, to = to, plot = inset)

diff --git a/search.json b/search.json index 7c1ccd1..2190f05 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://hughjonesd.github.io/ggmagnify/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 ggmagnify authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"David Hugh-Jones. Author, maintainer.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hugh-Jones D (2024). ggmagnify: Create Magnified Inset Part \"Ggplot\" Object. R package version 0.4.1, https://hughjonesd.github.io/ggmagnify/, https://github.com/hughjonesd/ggmagnify.","code":"@Manual{, title = {ggmagnify: Create a Magnified Inset of Part of a \"Ggplot\" Object}, author = {David Hugh-Jones}, year = {2024}, note = {R package version 0.4.1, https://hughjonesd.github.io/ggmagnify/}, url = {https://github.com/hughjonesd/ggmagnify}, }"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"ggmagnify-","dir":"","previous_headings":"","what":"Create a Magnified Inset of Part of a ","title":"Create a Magnified Inset of Part of a ","text":"ggmagnify creates magnified inset part ggplot object. magnified area can (rounded) rectangle, ellipse, convex hull points, arbitrary shape. Borders can drawn around target area inset, along projection lines /shading two. inset can drop shadow. can install ggmagnify r-universe: install latest github release (currently ggmagnify 0.4.0). install development version GitHub :","code":"install.packages(\"ggmagnify\", repos = c(\"https://hughjonesd.r-universe.dev\", \"https://cloud.r-project.org\")) # install.packages(\"remotes\") remotes::install_github(\"hughjonesd/ggmagnify\")"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"basic-inset","dir":"","previous_headings":"","what":"Basic inset","title":"Create a Magnified Inset of Part of a ","text":"create inset, use geom_magnify(, ). can vector giving four corners area magnify: = c(xmin, xmax, ymin, ymax). Similarly, specifies magnified inset go: = c(xmin, xmax, ymin, ymax).","code":"library(ggplot2) library(ggmagnify) ggp <- ggplot(dv, aes(Position, NegLogP)) + geom_point(color = \"darkblue\", alpha = 0.8, size = 0.8) + labs(title = \"GWAS p-values for cognitive function\", subtitle = \"Davies et al. (2018).\", y = \"-log(p)\") from <- c(xmin = 9.75e7, xmax = 9.95e7, ymin = 16, ymax = 28) # Names xmin, xmax, ymin, ymax are optional: to <- c(2e8 - 2e7, 2e8 + 2e7,10, 26) ggp + geom_magnify(from = from, to = to)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"inset-with-shadow","dir":"","previous_headings":"","what":"Inset with shadow","title":"Create a Magnified Inset of Part of a ","text":"","code":"loadNamespace(\"ggfx\") #> ggp + geom_magnify(from = from, to = to, shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"rounded-corners","dir":"","previous_headings":"","what":"Rounded corners","title":"Create a Magnified Inset of Part of a ","text":"New version 0.3.0, use corners give proportional radius rounded corners.","code":"ggp + geom_magnify(from = from, to = to, corners = 0.1, shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"ellipse","dir":"","previous_headings":"","what":"Ellipse","title":"Create a Magnified Inset of Part of a ","text":"requires R 4.1 higher, appropriate graphics device.","code":"ggp + geom_magnify(from = from, to = to, shape = \"ellipse\", shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"pick-points-to-magnify","dir":"","previous_headings":"","what":"Pick points to magnify","title":"Create a Magnified Inset of Part of a ","text":"choose points magnify, map aes():","code":"ggpi <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(c(1.5, 6)) ggpi + geom_magnify(aes(from = Species == \"setosa\" & Sepal.Length < 5), to = c(4, 6, 6, 7.5))"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"faceting","dir":"","previous_headings":"","what":"Faceting","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggpi + facet_wrap(vars(Species)) + geom_magnify(aes(from = Sepal.Length > 5 & Sepal.Length < 6.5), to = c(4.5, 6, 6, 7.5), shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"magnify-an-arbitrary-region-experimental","dir":"","previous_headings":"","what":"Magnify an arbitrary region (experimental)","title":"Create a Magnified Inset of Part of a ","text":"Use shape = \"outline\" magnify convex hull set points: Use grob data frame magnify shape:","code":"library(dplyr) starwars_plot <- starwars |> mutate(Human = species == \"Human\") |> select(mass, height, Human) |> na.omit() |> ggplot(aes(mass, height, color = Human)) + geom_point() + xlim(0, 220) + ylim(0, 250) + theme_dark() + theme(panel.grid = element_line(linetype = 2, colour = \"yellow\"), axis.line = element_blank(), panel.background = element_rect(fill = \"black\"), legend.key = element_rect(fill= \"black\"), rect = element_rect(fill = \"black\"), text = element_text(colour = \"white\")) + scale_colour_manual(values = c(\"TRUE\" = \"red\", \"FALSE\" = \"lightblue\")) + ggtitle(\"Mass and height of Star Wars characters\", subtitle = \"Humans magnified\") starwars_plot + geom_magnify(aes(from = Human), to = c(30, 200, 0, 120), shadow = TRUE, shadow.args = list(colour = \"yellow\", sigma = 10, x_offset = 2, y_offset = 5), alpha = 0.8, colour = \"yellow\", linewidth = 0.6, shape = \"outline\", expand = 0.2) #> Warning: Removed 1 rows containing missing values (`geom_point()`). s <- seq(0, 2*pi, length = 7) hex <- data.frame(x = 3 + sin(s)/2, y = 6 + cos(s)/2) ggpi + geom_magnify(from = hex, to = c(4, 6, 5, 7), shadow = TRUE, aspect = \"fixed\")"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"maps-experimental","dir":"","previous_headings":"","what":"Maps (experimental)","title":"Create a Magnified Inset of Part of a ","text":"maps, shape = \"outline\" magnifies just selected map polygons:","code":"usa <- sf::st_as_sf(maps::map(\"state\", fill=TRUE, plot =FALSE)) ggpm <- ggplot(usa) + geom_sf(aes(fill = ID == \"texas\"), colour = \"grey20\") + coord_sf(default_crs = sf::st_crs(4326), ylim = c(10, 50)) + theme(legend.position = \"none\") + scale_fill_manual(values = c(\"TRUE\" = \"red\", \"FALSE\" = \"steelblue4\")) ggpm + geom_magnify(aes(from = ID == \"texas\"), to = c(-125, -98, 10, 30), shadow = TRUE, linewidth = 1, colour = \"orange2\", shape = \"outline\", aspect = \"fixed\", expand = 0)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"axes","dir":"","previous_headings":"","what":"Axes","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggp + scale_x_continuous(labels = NULL) + geom_magnify(from = from, to = to, axes = \"xy\")"},{"path":[]},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"colour-and-linetype","dir":"","previous_headings":"Projection lines and borders","what":"Colour and linetype","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggp + geom_magnify(from = from, to = to, colour = \"darkgreen\", linewidth = 0.5, proj.linetype = 3)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"projection-line-styles","dir":"","previous_headings":"Projection lines and borders","what":"Projection line styles","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggpi <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() from2 <- c(3, 3.5, 6.5, 7) to2 <- c(2.75, 3.75, 5, 6) ggpi + geom_magnify(from = from2, to = to2, proj = \"facing\") # the default ggpi + geom_magnify(from = from2, to = to2, proj = \"corresponding\") # always project corner to corner ggpi + geom_magnify(from = from2, to = to2, proj = \"single\") # just one line"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"projection-fill","dir":"","previous_headings":"Projection lines and borders","what":"Projection fill","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggpi + geom_magnify(from = from2, to = to2, proj.fill = alpha(\"yellow\", 0.2)) # fill between the lines ggpi + geom_magnify(from = from2, to = to2, shape = \"ellipse\", proj.fill = alpha(\"orange\", 0.2)) # works with any shape"},{"path":[]},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"graphics-devices","dir":"","previous_headings":"Tips and tricks","what":"Graphics devices","title":"Create a Magnified Inset of Part of a ","text":"geom_magnify() uses masks. requires R version 4.1.0 higher, graphics device supports masking. using knitr, may luck ragg_png device (used create README). device doesn’t support masks, shape = \"rect\" work, plot inset clipped panel area.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"adding-layers-to-the-inset","dir":"","previous_headings":"Tips and tricks","what":"Adding layers to the inset","title":"Create a Magnified Inset of Part of a ","text":"geom_magnify() stores plot added . , order matters: complex modifications inset, set plot explicitly:","code":"ggpi <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(2, 6) from3 <- c(2.5, 3.5, 6, 7) to3 <- c(4.7, 6.1, 4.3, 5.7) ggpi + geom_smooth() + geom_magnify(from = from3, to = to3) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # Print the inset without the smooth: ggpi + geom_magnify(from = from3, to = to3) + geom_smooth() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' booms <- ggplot(faithfuld, aes(waiting, eruptions)) + geom_contour_filled(aes(z = density), bins = 50) + scale_fill_viridis_d(option = \"B\") + theme(legend.position = \"none\") booms_inset <- booms + geom_point(data = faithful, color = \"red\", fill = \"white\", alpha = 0.7, size = 2, shape = \"circle filled\") + coord_cartesian(expand = FALSE) shadow.args <- list( colour = alpha(\"grey80\", 0.8), x_offset = 0, y_offset = 0, sigma = 10 ) booms + geom_magnify(from = c(78, 90, 4.0, 4.8), to = c(70, 90, 1.7, 3.3), colour = \"white\", shape = \"ellipse\", shadow = TRUE, shadow.args = shadow.args, plot = booms_inset)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"draw-an-inset-outside-the-plot-region","dir":"","previous_headings":"Tips and tricks","what":"Draw an inset outside the plot region","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggp + coord_cartesian(clip = \"off\") + theme(plot.margin = ggplot2::margin(10, 60, 10, 10)) + geom_magnify(from = from, to = to + c(0.5e8, 0.5e8, 0, 0), shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"keep-grid-lines-the-same","dir":"","previous_headings":"Tips and tricks","what":"Keep grid lines the same","title":"Create a Magnified Inset of Part of a ","text":"make sure inset uses grid lines main graph, set breaks scale_x scale_y:","code":"ggp2 <- ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) + geom_point() + theme_classic() + theme(panel.grid.major = element_line(\"grey80\"), panel.grid.minor = element_line(\"grey90\")) # different grid lines: ggp2 + geom_magnify(from = c(2.45, 3.05, 5.9, 6.6), to = c(3.4, 4.4, 5.5, 6.6), shadow = TRUE) # fix the grid lines: ggp2 + scale_x_continuous(breaks = seq(2, 5, 0.5)) + scale_y_continuous(breaks = seq(5, 8, 0.5)) + geom_magnify(from = c(2.45, 3.05, 5.9, 6.6), to = c(3.4, 4.4, 5.5, 6.6), shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"recomputing-data","dir":"","previous_headings":"Tips and tricks","what":"Recomputing data","title":"Create a Magnified Inset of Part of a ","text":"Use recompute want recompute smoothers, densities, etc. inset.","code":"df <- data.frame(x = seq(-5, 5, length = 500), y = 0) df$y[abs(df$x) < 1] <- sin(df$x[abs(df$x) < 1]) df$y <- df$y + rnorm(500, mean = 0, sd = 0.25) ggp2 <- ggplot(df, aes(x, y)) + geom_point() + geom_smooth(method = \"loess\", formula = y ~ x) + ylim(-5, 5) # The default: ggp2 + geom_magnify(from = c(-1.25, 1.25, -1, 1), to = c(2, 5, 1, 5)) # Recomputing recalculates the smooth for the inset: ggp2 + geom_magnify(from = c(-1.25, 1.25, -1, 1), to = c(2, 5, 1, 5), recompute = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"magnify-twice","dir":"","previous_headings":"Tips and tricks","what":"Magnify twice","title":"Create a Magnified Inset of Part of a ","text":"inset within inset bit complex, also doable:","code":"data <- data.frame( x = runif(4000), y = runif(4000) ) ggm_unif <- ggplot(data, aes(x, y)) + coord_cartesian(expand = FALSE) + geom_density2d_filled(bins = 50, linewidth = 0, n = 200) + geom_point(color='white', alpha = .5, size = .5) + theme(legend.position = \"none\") ggm_unif + geom_magnify(from = c(0.05, 0.15, 0.05, 0.15), to = c(0.2, 0.4, 0.2, 0.4), colour = \"white\", proj.linetype = 1, linewidth = 0.6) + geom_magnify(from = c(0.25, 0.35, 0.25, 0.35), to = c(0.45, 0.85, 0.45, 0.85), expand = 0, colour =\"white\", proj.linetype = 1) ggp <- data.frame(x = rnorm(1e5), y = rnorm(1e5), colour = sample(8L, 1e5, replace = TRUE)) |> ggplot(aes(x = x, y = y, colour = factor(colour))) + scale_color_brewer(type = \"qual\", palette = 2) + geom_point(alpha = 0.12, size = 0.7) + lims(x = c(-3,3), y = c(-3,3)) + theme_classic() + theme(panel.grid = element_blank(), axis.line = element_blank(), plot.background = element_rect(fill = \"black\"), panel.background = element_rect(fill = \"black\"), title = element_text(colour = \"white\"), legend.position = \"none\") ggpm <- ggp + lims(x = c(-0.3, 0.3), y = c(-0.3, 0.3)) + geom_magnify(from = c(-0.03, 0.03, -0.03, 0.03), to = c(-0.3, -0.1, -0.3, -0.1), expand = FALSE, colour = \"white\") #> Scale for x is already present. #> Adding another scale for x, which will replace the existing scale. #> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale. ggp + geom_magnify(plot = ggpm, from = c(-0.3, 0.3, -0.3, 0.3), to = c(-3, -1, -3, -1), expand = FALSE, colour = \"white\") + labs(title = \"Normal data\", subtitle = \"The distribution gets more uniform as you zoom in\") #> Warning: Removed 570 rows containing missing values (`geom_point()`)."},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Create a Magnified Inset of Part of a ","text":"ggmagnify inspired post motivated making plots. Data GWAS plots comes : Davies et al. (2018) ‘Study 300,486 individuals identifies 148 independent genetic loci influencing general cognitive function.’ Nature Communications. Data trimmed remove overlapping points.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/GeomMagnify.html","id":null,"dir":"Reference","previous_headings":"","what":"Internals — GeomMagnify","title":"Internals — GeomMagnify","text":"Internals","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a magnified inset of a plot — geom_magnify","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify() creates magnified inset part ggplot. Optional borders drawn around target inset, along projection lines one . gives location target area, gives location inset. Usually, specified c(xmin, xmax, ymin, ymax).","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a magnified inset of a plot — geom_magnify","text":"","code":"geom_magnify( mapping = NULL, data = NULL, stat = StatMagnify, position = \"identity\", ..., shape = c(\"rect\", \"ellipse\", \"outline\"), expand = 0.1, aspect = c(\"free\", \"fixed\"), axes = \"\", proj = c(\"facing\", \"corresponding\", \"single\"), shadow = FALSE, corners = 0, colour = \"black\", linetype = 1, target.linetype = linetype, inset.linetype = linetype, proj.linetype = 2, alpha = 1, linewidth = 0.4, proj.fill = NULL, plot = NULL, shadow.args = list(sigma = 5, colour = \"grey40\", x_offset = 5, y_offset = 5), recompute = FALSE, scale.inset = 1, proj.combine = TRUE, na.rm = FALSE, inherit.aes = TRUE ) geom_magnify_tile( mapping = NULL, data = NULL, stat = StatMagnifyTile, position = \"identity\", ..., shape = c(\"rect\", \"ellipse\", \"outline\"), expand = 0.1, aspect = c(\"free\", \"fixed\"), axes = \"\", proj = \"facing\", shadow = FALSE, corners = 0, colour = \"black\", linetype = 1, target.linetype = linetype, inset.linetype = linetype, proj.linetype = 2, alpha = 1, linewidth = 0.4, proj.fill = NULL, plot = NULL, shadow.args = list(sigma = 5, colour = \"grey40\", x_offset = 5, y_offset = 5), recompute = FALSE, scale.inset = 1, proj.combine = TRUE, na.rm = FALSE, inherit.aes = FALSE )"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a magnified inset of a plot — geom_magnify","text":"mapping, data, stat, position, ..., na.rm See e.g. ggplot2::geom_point(). shape Shape area magnified. \"rect\" rectangle. \"ellipse\" ellipse. \"outline\" convex hull points target area, map polygons. expand Number. Expand target area inset proportionally amount. aspect String. \"fixed\" fix aspect ratio (overrides ymax). axes String. axes plot inset? \"\", \"x\", \"y\" \"xy\". proj String. style projection lines draw? \"facing\" (default), \"corresponding\" \"single\". Can abbreviated. See . shadow Logical. Draw shadow behind inset plot? Requires \"ggfx\" package. corners Numeric 0 1. Radius rounded corners target area inset. used shape \"rect\". 0.1 good starting value. linetype, colour, alpha, linewidth Linetype, colour, alpha linewidth borders projection lines. target.linetype, inset.linetype, proj.linetype Linetypes specific components. Set 0 lines. proj.fill Colour fill projection lines. NULL fill. Add alpha using e.g. scales::alpha(). Ignored proj = \"single\". plot Ggplot object plot inset. NULL, defaults ggplot object geom_magnify() added. Overrides axes set. Use inset_theme() give plot appropriate theme. shadow.args List. Arguments ggfx::with_shadow(). recompute Logical. TRUE, use lims() replot inset. Statistics, e.g. smoothing lines, recomputed using data target area. FALSE, use coord_cartesian() replot inset, keeping data. scale.inset Length 1 2 numeric. Normally, exactly target area shown inset. Sometimes may wish rescale plot inset. Use 2 numbers scale width height separately. proj.combine Logical. draw projection lines one polygon/map area magnified? FALSE draws one set projection lines area. TRUE draws single set lines areas. inherit.aes FALSE, overrides default aesthetics, rather combining . useful helper functions define data aesthetics inherit behaviour default plot specification, e.g. borders().","code":""},{"path":[]},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"aesthetics","dir":"Reference","previous_headings":"","what":"Aesthetics","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify understand following aesthetics (required aesthetics bold): can vectors length 4, like list(xmin, xmax, ymin, ymax). specify bottom left top right corners target area magnify, area magnified inset. lists can optionally named: list(xmin = 1, xmax = 2, ymin = 3, ymax = 4). Note: early versions ggmagnify used different order coordinates: list(xmin, ymin, xmax, ymax). Alternatively, can : data frame points two columns x y, grid::grob() object. Points within grob region (polygon spanned data frame) magnified. Points scale data, default.units = \"native\" grob. shape ignored. logical vector. Points data TRUE surrounded rectangle, ellipse outline. Normally set call geom_magnify(). can specify aesthetics, e.g. want different areas per facet. , may need wrap list() make sure length one per row data. first row per panel used. (magnify multiple areas one panel, use multiple calls geom_magnify().)","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"shapes","dir":"Reference","previous_headings":"","what":"Shapes","title":"Create a magnified inset of a plot — geom_magnify","text":"shape = \"ellipse\" elliptical area magnified. may include points within target area given . shape = \"outline\" convex hull drawn around points target area. works using geom_point() geom aesthetics x y. plotting map, \"outline\" magnifies exactly map features selected .","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"projection-lines","dir":"Reference","previous_headings":"","what":"Projection lines","title":"Create a magnified inset of a plot — geom_magnify","text":"proj = \"corresponding\" \"facing\" draws projection lines corners target corners inset. \"corresponding\" always projects corner target corner inset. \"facing\" sometimes draws lines facing corners, looks cleaner. non-rectangular insets, \"facing\" \"corresponding\" . \"single\" draws single line midpoint facing sides. draw lines, set proj.linetype = 0.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"limitations","dir":"Reference","previous_headings":"","what":"Limitations","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify() uses masks. requires R version 4.1.0 higher, graphics device supports masking. using knitr, may luck ragg_png device. device support masks, shape = \"rect\" work, plot inset clipped panel area. R graphics devices predictable. current recommendations : ragg_png knitr; cairo_pdf PDF output; RStudio AGG backend interactive output. mileage may vary. geom_magnify() uses dark magic deal faceting. may break older, newer, versions ggplot2. need faceting, want code robust upgrades, set options(ggmagnify.safe_mode = TRUE) use slightly less magic. design, geom_magnify() replots original plot using new limits. directly copy target area pixels. advantage can e.g. add axes, plot points appropriate size, zoom data invisible main plot, recompute derived graphics. want exact pixel--pixel copy, use different tool. geom_magnify() may break discrete scales. limitation ggplot2 now. Find bug? Report https://github.com/hughjonesd/ggmagnify/issues/.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"geom-magnify-tile-","dir":"Reference","previous_headings":"","what":"geom_magnify_tile()","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify_tile() version geom_magnify() uses different aesthetics. Set x, width, y, height to_x, to_width to_y, to_height specify target inset location.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a magnified inset of a plot — geom_magnify","text":"","code":"library(ggplot2) ggp <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(c(2, 6)) from <- list(2.5, 3.5, 6, 7) to <- list(4, 6, 5, 7) # Basic magnification ggp + geom_magnify(from = from, to = to) # Convex hull of points ggp + geom_magnify(aes(from = Species == \"setosa\"), to = c(3, 5, 6, 8), shape = \"outline\") # Order matters # `geom_magnify()` stores the plot when it is added to it: ggp + scale_color_brewer() + geom_magnify(from = from, to = to) # This will print the inset without the new scale: ggp + geom_magnify(from = from, to = to) + scale_color_brewer() # For more examples see https://github.com/hughjonesd/ggmagnify"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a grob from a subset of sf data — grob_where","title":"Create a grob from a subset of sf data — grob_where","text":"Create grob subset sf data","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a grob from a subset of sf data — grob_where","text":"","code":"grob_where(where, sf, crs = NULL)"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a grob from a subset of sf data — grob_where","text":"Logical condition evaluated sf. sf object class sf. crs Optional coordinate reference system.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a grob from a subset of sf data — grob_where","text":"grid::grob() can pass .","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a grob from a subset of sf data — grob_where","text":"","code":"library(ggplot2) if (requireNamespace(\"sf\", quietly = TRUE) && requireNamespace(\"maps\", quietly = TRUE)) { usa <- sf::st_as_sf(maps::map(\"state\", fill=TRUE, plot = FALSE)) texas <- grob_where(ID == \"texas\", usa, crs = sf::st_crs(4326)) ggplot(usa) + coord_sf(crs = sf::st_crs(4326)) + geom_sf() + geom_magnify(from = texas, to = c(-90, -70, 25, 35), colour = \"red\", aspect = \"fixed\", expand = 0) } #> Coordinate system already present. Adding new coordinate system, which will #> replace the existing one."},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_blanks.html","id":null,"dir":"Reference","previous_headings":"","what":"Default elements to blank in the ggmagnify inset — inset_blanks","title":"Default elements to blank in the ggmagnify inset — inset_blanks","text":"Default elements blank ggmagnify inset","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_blanks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default elements to blank in the ggmagnify inset — inset_blanks","text":"","code":"inset_blanks(..., axes)"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_blanks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default elements to blank in the ggmagnify inset — inset_blanks","text":"... Character vector extra elements blank. axes String. axes plot inset? \"\", \"x\", \"y\" \"xy\".","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_blanks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default elements to blank in the ggmagnify inset — inset_blanks","text":"character vector.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a theme suitable for an inset ggplot — inset_theme","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"Use inset_theme() add suitable theme manually-created inset plot.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"","code":"inset_theme( blank = inset_blanks(axes = axes), axes, margin = if (axes == \"\") 0 else 8 )"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"blank Character vector theme elements blank. See ggplot2::theme(). axes String. axes plot inset? \"\", \"x\", \"y\" \"xy\". margin Margin around plot. See plot.margin ggplot2::theme().","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"ggplot theme object","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"","code":"library(ggplot2) ggp <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(c(2, 6)) from <- list(2.5, 3.5, 6, 7) to <- list(4, 6, 5, 7) inset <- ggp + geom_density2d() + inset_theme(axes = \"\") ggp + geom_magnify(from = from, to = to, plot = inset)"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper functions to find rectangles or convex hulls of data — rect_around","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"Helper functions find rectangles convex hulls data","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"","code":"rect_around(x, y, data = NULL, expand = 0) hull_around(x, y, data = NULL, expand = 0)"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"x, y Unquoted names expressions data data frame expand Amount expand data around midpoint. Default 10 per cent.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"rect_around() returns list names xmin, xmax, ymin, ymax. hull_around() returns data frame columns x y.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"","code":"library(ggplot2) to <- c(2, 4.5, 6, 8) setosas <- iris[iris$Species == \"setosa\", ] rect_around(Sepal.Width, Sepal.Length, data = setosas) #> $xmin #> [1] 2.3 #> #> $xmax #> [1] 4.4 #> #> $ymin #> [1] 4.3 #> #> $ymax #> [1] 5.8 #> hull_around(Sepal.Width, Sepal.Length, data = setosas) #> x y #> 1 3.6 4.6 #> 2 3.0 4.3 #> 3 2.3 4.5 #> 4 3.5 5.5 #> 5 3.8 5.7 #> 6 4.0 5.8 #> 7 4.4 5.7 #> 8 4.1 5.2"},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-041","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.4.1","title":"ggmagnify 0.4.1","text":"Bugfix: inset_theme() overridden explicitly passed-inset plot objects. Thanks @XanderDes","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-040","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.4.0","title":"ggmagnify 0.4.0","text":"New proj.fill argument fill area projection lines.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-030","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.3.0","title":"ggmagnify 0.3.0","text":"New corners argument sets corner radius target inset. Thanks @thomasp85 help .","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-020","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.2.0","title":"ggmagnify 0.2.0","text":"can now logical vector points select. Use shape = \"outline\" magnify convex hull selected points. : xmin, ymin, xmax, ymax. Now: xmin, xmax, ymin, ymax. much easier think . can name arguments avoid confusion. Added proj.combine argument draw combined separate projection lines multiple target areas. Added helper functions find rectangles, convex hulls grobs. Added NEWS.md file track changes package.","code":""}] +[{"path":"https://hughjonesd.github.io/ggmagnify/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 ggmagnify authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"David Hugh-Jones. Author, maintainer.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hugh-Jones D (2024). ggmagnify: Create Magnified Inset Part \"Ggplot\" Object. R package version 0.4.1, https://hughjonesd.github.io/ggmagnify/, https://github.com/hughjonesd/ggmagnify.","code":"@Manual{, title = {ggmagnify: Create a Magnified Inset of Part of a \"Ggplot\" Object}, author = {David Hugh-Jones}, year = {2024}, note = {R package version 0.4.1, https://hughjonesd.github.io/ggmagnify/}, url = {https://github.com/hughjonesd/ggmagnify}, }"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"ggmagnify-","dir":"","previous_headings":"","what":"Create a Magnified Inset of Part of a ","title":"Create a Magnified Inset of Part of a ","text":"ggmagnify creates magnified inset part ggplot object. magnified area can (rounded) rectangle, ellipse, convex hull points, arbitrary shape. Borders can drawn around target area inset, along projection lines /shading two. inset can drop shadow. can install ggmagnify r-universe: install latest github release (currently ggmagnify 0.4.0). install development version GitHub :","code":"install.packages(\"ggmagnify\", repos = c(\"https://hughjonesd.r-universe.dev\", \"https://cloud.r-project.org\")) # install.packages(\"remotes\") remotes::install_github(\"hughjonesd/ggmagnify\")"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"basic-inset","dir":"","previous_headings":"","what":"Basic inset","title":"Create a Magnified Inset of Part of a ","text":"create inset, use geom_magnify(, ). can vector giving four corners area magnify: = c(xmin, xmax, ymin, ymax). Similarly, specifies magnified inset go: = c(xmin, xmax, ymin, ymax).","code":"library(ggplot2) library(ggmagnify) ggp <- ggplot(dv, aes(Position, NegLogP)) + geom_point(color = \"darkblue\", alpha = 0.8, size = 0.8) + labs(title = \"GWAS p-values for cognitive function\", subtitle = \"Davies et al. (2018).\", y = \"-log(p)\") from <- c(xmin = 9.75e7, xmax = 9.95e7, ymin = 16, ymax = 28) # Names xmin, xmax, ymin, ymax are optional: to <- c(2e8 - 2e7, 2e8 + 2e7,10, 26) ggp + geom_magnify(from = from, to = to)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"inset-with-shadow","dir":"","previous_headings":"","what":"Inset with shadow","title":"Create a Magnified Inset of Part of a ","text":"","code":"loadNamespace(\"ggfx\") #> ggp + geom_magnify(from = from, to = to, shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"rounded-corners","dir":"","previous_headings":"","what":"Rounded corners","title":"Create a Magnified Inset of Part of a ","text":"New version 0.3.0, use corners give proportional radius rounded corners.","code":"ggp + geom_magnify(from = from, to = to, corners = 0.1, shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"ellipse","dir":"","previous_headings":"","what":"Ellipse","title":"Create a Magnified Inset of Part of a ","text":"requires R 4.1 higher, appropriate graphics device.","code":"ggp + geom_magnify(from = from, to = to, shape = \"ellipse\", shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"pick-points-to-magnify","dir":"","previous_headings":"","what":"Pick points to magnify","title":"Create a Magnified Inset of Part of a ","text":"choose points magnify, map aes():","code":"ggpi <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(c(1.5, 6)) ggpi + geom_magnify(aes(from = Species == \"setosa\" & Sepal.Length < 5), to = c(4, 6, 6, 7.5))"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"faceting","dir":"","previous_headings":"","what":"Faceting","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggpi + facet_wrap(vars(Species)) + geom_magnify(aes(from = Sepal.Length > 5 & Sepal.Length < 6.5), to = c(4.5, 6, 6, 7.5), shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"magnify-an-arbitrary-region-experimental","dir":"","previous_headings":"","what":"Magnify an arbitrary region (experimental)","title":"Create a Magnified Inset of Part of a ","text":"Use shape = \"outline\" magnify convex hull set points: Use grob data frame magnify shape:","code":"library(dplyr) starwars_plot <- starwars |> mutate(Human = species == \"Human\") |> select(mass, height, Human) |> na.omit() |> ggplot(aes(mass, height, color = Human)) + geom_point() + xlim(0, 220) + ylim(0, 250) + theme_dark() + theme(panel.grid = element_line(linetype = 2, colour = \"yellow\"), axis.line = element_blank(), panel.background = element_rect(fill = \"black\"), legend.key = element_rect(fill= \"black\"), rect = element_rect(fill = \"black\"), text = element_text(colour = \"white\")) + scale_colour_manual(values = c(\"TRUE\" = \"red\", \"FALSE\" = \"lightblue\")) + ggtitle(\"Mass and height of Star Wars characters\", subtitle = \"Humans magnified\") starwars_plot + geom_magnify(aes(from = Human), to = c(30, 200, 0, 120), shadow = TRUE, shadow.args = list(colour = \"yellow\", sigma = 10, x_offset = 2, y_offset = 5), alpha = 0.8, colour = \"yellow\", linewidth = 0.6, shape = \"outline\", expand = 0.2) #> Warning: Removed 1 rows containing missing values (`geom_point()`). s <- seq(0, 2*pi, length = 7) hex <- data.frame(x = 3 + sin(s)/2, y = 6 + cos(s)/2) ggpi + geom_magnify(from = hex, to = c(4, 6, 5, 7), shadow = TRUE, aspect = \"fixed\")"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"maps-experimental","dir":"","previous_headings":"","what":"Maps (experimental)","title":"Create a Magnified Inset of Part of a ","text":"maps, shape = \"outline\" magnifies just selected map polygons:","code":"usa <- sf::st_as_sf(maps::map(\"state\", fill=TRUE, plot =FALSE)) ggpm <- ggplot(usa) + geom_sf(aes(fill = ID == \"texas\"), colour = \"grey20\") + coord_sf(default_crs = sf::st_crs(4326), ylim = c(10, 50)) + theme(legend.position = \"none\") + scale_fill_manual(values = c(\"TRUE\" = \"red\", \"FALSE\" = \"steelblue4\")) ggpm + geom_magnify(aes(from = ID == \"texas\"), to = c(-125, -98, 10, 30), shadow = TRUE, linewidth = 1, colour = \"orange2\", shape = \"outline\", aspect = \"fixed\", expand = 0)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"axes","dir":"","previous_headings":"","what":"Axes","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggp + scale_x_continuous(labels = NULL) + geom_magnify(from = from, to = to, axes = \"xy\")"},{"path":[]},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"colour-and-linetype","dir":"","previous_headings":"Projection lines and borders","what":"Colour and linetype","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggp + geom_magnify(from = from, to = to, colour = \"darkgreen\", linewidth = 0.5, proj.linetype = 3)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"projection-line-styles","dir":"","previous_headings":"Projection lines and borders","what":"Projection line styles","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggpi <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() from2 <- c(3, 3.5, 6.5, 7) to2 <- c(2.75, 3.75, 5, 6) ggpi + geom_magnify(from = from2, to = to2, proj = \"facing\") # the default ggpi + geom_magnify(from = from2, to = to2, proj = \"corresponding\") # always project corner to corner ggpi + geom_magnify(from = from2, to = to2, proj = \"single\") # just one line"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"projection-fill","dir":"","previous_headings":"Projection lines and borders","what":"Projection fill","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggpi + geom_magnify(from = from2, to = to2, proj.fill = alpha(\"yellow\", 0.2)) # fill between the lines ggpi + geom_magnify(from = from2, to = to2, shape = \"ellipse\", proj.fill = alpha(\"orange\", 0.2)) # works with any shape"},{"path":[]},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"graphics-devices","dir":"","previous_headings":"Tips and tricks","what":"Graphics devices","title":"Create a Magnified Inset of Part of a ","text":"geom_magnify() uses masks. requires R version 4.1.0 higher, graphics device supports masking. using knitr, may luck ragg_png device (used create README). device doesn’t support masks, shape = \"rect\" work, plot inset clipped panel area.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"adding-layers-to-the-inset","dir":"","previous_headings":"Tips and tricks","what":"Adding layers to the inset","title":"Create a Magnified Inset of Part of a ","text":"geom_magnify() stores plot added . , order matters: complex modifications inset, set plot explicitly:","code":"ggpi <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(2, 6) from3 <- c(2.5, 3.5, 6, 7) to3 <- c(4.7, 6.1, 4.3, 5.7) ggpi + geom_smooth() + geom_magnify(from = from3, to = to3) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # Print the inset without the smooth: ggpi + geom_magnify(from = from3, to = to3) + geom_smooth() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' booms <- ggplot(faithfuld, aes(waiting, eruptions)) + geom_contour_filled(aes(z = density), bins = 50) + scale_fill_viridis_d(option = \"B\") + theme(legend.position = \"none\") booms_inset <- booms + geom_point(data = faithful, color = \"red\", fill = \"white\", alpha = 0.7, size = 2, shape = \"circle filled\") + coord_cartesian(expand = FALSE) shadow.args <- list( colour = alpha(\"grey80\", 0.8), x_offset = 0, y_offset = 0, sigma = 10 ) booms + geom_magnify(from = c(78, 90, 4.0, 4.8), to = c(70, 90, 1.7, 3.3), colour = \"white\", shape = \"ellipse\", shadow = TRUE, shadow.args = shadow.args, plot = booms_inset)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"draw-an-inset-outside-the-plot-region","dir":"","previous_headings":"Tips and tricks","what":"Draw an inset outside the plot region","title":"Create a Magnified Inset of Part of a ","text":"","code":"ggp + coord_cartesian(clip = \"off\") + theme(plot.margin = ggplot2::margin(10, 60, 10, 10)) + geom_magnify(from = from, to = to + c(0.5e8, 0.5e8, 0, 0), shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"keep-grid-lines-the-same","dir":"","previous_headings":"Tips and tricks","what":"Keep grid lines the same","title":"Create a Magnified Inset of Part of a ","text":"make sure inset uses grid lines main graph, set breaks scale_x scale_y:","code":"ggp2 <- ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) + geom_point() + theme_classic() + theme(panel.grid.major = element_line(\"grey80\"), panel.grid.minor = element_line(\"grey90\")) # different grid lines: ggp2 + geom_magnify(from = c(2.45, 3.05, 5.9, 6.6), to = c(3.4, 4.4, 5.5, 6.6), shadow = TRUE) # fix the grid lines: ggp2 + scale_x_continuous(breaks = seq(2, 5, 0.5)) + scale_y_continuous(breaks = seq(5, 8, 0.5)) + geom_magnify(from = c(2.45, 3.05, 5.9, 6.6), to = c(3.4, 4.4, 5.5, 6.6), shadow = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"recomputing-data","dir":"","previous_headings":"Tips and tricks","what":"Recomputing data","title":"Create a Magnified Inset of Part of a ","text":"Use recompute want recompute smoothers, densities, etc. inset.","code":"df <- data.frame(x = seq(-5, 5, length = 500), y = 0) df$y[abs(df$x) < 1] <- sin(df$x[abs(df$x) < 1]) df$y <- df$y + rnorm(500, mean = 0, sd = 0.25) ggp2 <- ggplot(df, aes(x, y)) + geom_point() + geom_smooth(method = \"loess\", formula = y ~ x) + ylim(-5, 5) # The default: ggp2 + geom_magnify(from = c(-1.25, 1.25, -1, 1), to = c(2, 5, 1, 5)) # Recomputing recalculates the smooth for the inset: ggp2 + geom_magnify(from = c(-1.25, 1.25, -1, 1), to = c(2, 5, 1, 5), recompute = TRUE)"},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"magnify-twice","dir":"","previous_headings":"Tips and tricks","what":"Magnify twice","title":"Create a Magnified Inset of Part of a ","text":"inset within inset bit complex, also doable:","code":"data <- data.frame( x = runif(4000), y = runif(4000) ) ggm_unif <- ggplot(data, aes(x, y)) + coord_cartesian(expand = FALSE) + geom_density2d_filled(bins = 50, linewidth = 0, n = 200) + geom_point(color='white', alpha = .5, size = .5) + theme(legend.position = \"none\") ggm_unif + geom_magnify(from = c(0.05, 0.15, 0.05, 0.15), to = c(0.2, 0.4, 0.2, 0.4), colour = \"white\", proj.linetype = 1, linewidth = 0.6) + geom_magnify(from = c(0.25, 0.35, 0.25, 0.35), to = c(0.45, 0.85, 0.45, 0.85), expand = 0, colour =\"white\", proj.linetype = 1) ggp <- data.frame(x = rnorm(1e5), y = rnorm(1e5), colour = sample(8L, 1e5, replace = TRUE)) |> ggplot(aes(x = x, y = y, colour = factor(colour))) + scale_color_brewer(type = \"qual\", palette = 2) + geom_point(alpha = 0.12, size = 0.7) + lims(x = c(-3,3), y = c(-3,3)) + theme_classic() + theme(panel.grid = element_blank(), axis.line = element_blank(), plot.background = element_rect(fill = \"black\"), panel.background = element_rect(fill = \"black\"), title = element_text(colour = \"white\"), legend.position = \"none\") ggpm <- ggp + lims(x = c(-0.3, 0.3), y = c(-0.3, 0.3)) + geom_magnify(from = c(-0.03, 0.03, -0.03, 0.03), to = c(-0.3, -0.1, -0.3, -0.1), expand = FALSE, colour = \"white\") #> Scale for x is already present. #> Adding another scale for x, which will replace the existing scale. #> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale. ggp + geom_magnify(plot = ggpm, from = c(-0.3, 0.3, -0.3, 0.3), to = c(-3, -1, -3, -1), expand = FALSE, colour = \"white\") + labs(title = \"Normal data\", subtitle = \"The distribution gets more uniform as you zoom in\") #> Warning: Removed 570 rows containing missing values (`geom_point()`)."},{"path":"https://hughjonesd.github.io/ggmagnify/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Create a Magnified Inset of Part of a ","text":"ggmagnify inspired post motivated making plots. Data GWAS plots comes : Davies et al. (2018) ‘Study 300,486 individuals identifies 148 independent genetic loci influencing general cognitive function.’ Nature Communications. Data trimmed remove overlapping points.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/GeomMagnify.html","id":null,"dir":"Reference","previous_headings":"","what":"Internals — GeomMagnify","title":"Internals — GeomMagnify","text":"Internals","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a magnified inset of a plot — geom_magnify","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify() creates magnified inset part ggplot. Optional borders drawn around target inset, along projection lines one . gives location target area, gives location inset. Usually, specified c(xmin, xmax, ymin, ymax).","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a magnified inset of a plot — geom_magnify","text":"","code":"geom_magnify( mapping = NULL, data = NULL, stat = StatMagnify, position = \"identity\", ..., shape = c(\"rect\", \"ellipse\", \"outline\"), expand = 0.1, aspect = c(\"free\", \"fixed\"), axes = \"\", proj = c(\"facing\", \"corresponding\", \"single\"), shadow = FALSE, corners = 0, colour = \"black\", linetype = 1, target.linetype = linetype, inset.linetype = linetype, proj.linetype = 2, alpha = 1, linewidth = 0.4, proj.fill = NULL, plot = NULL, shadow.args = list(sigma = 5, colour = \"grey40\", x_offset = 5, y_offset = 5), recompute = FALSE, scale.inset = 1, proj.combine = TRUE, na.rm = FALSE, inherit.aes = TRUE ) geom_magnify_tile( mapping = NULL, data = NULL, stat = StatMagnifyTile, position = \"identity\", ..., shape = c(\"rect\", \"ellipse\", \"outline\"), expand = 0.1, aspect = c(\"free\", \"fixed\"), axes = \"\", proj = \"facing\", shadow = FALSE, corners = 0, colour = \"black\", linetype = 1, target.linetype = linetype, inset.linetype = linetype, proj.linetype = 2, alpha = 1, linewidth = 0.4, proj.fill = NULL, plot = NULL, shadow.args = list(sigma = 5, colour = \"grey40\", x_offset = 5, y_offset = 5), recompute = FALSE, scale.inset = 1, proj.combine = TRUE, na.rm = FALSE, inherit.aes = FALSE )"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a magnified inset of a plot — geom_magnify","text":"mapping, data, stat, position, ..., na.rm See e.g. ggplot2::geom_point(). shape Shape area magnified. \"rect\" rectangle. \"ellipse\" ellipse. \"outline\" convex hull points target area, map polygons. expand Number. Expand target area inset proportionally amount. aspect String. \"fixed\" fix aspect ratio (overrides ymax). axes String. axes plot inset? \"\", \"x\", \"y\" \"xy\". proj String. style projection lines draw? \"facing\" (default), \"corresponding\" \"single\". Can abbreviated. See . shadow Logical. Draw shadow behind inset plot? Requires \"ggfx\" package. corners Numeric 0 1. Radius rounded corners target area inset. used shape \"rect\". 0.1 good starting value. linetype, colour, alpha, linewidth Linetype, colour, alpha linewidth borders projection lines. target.linetype, inset.linetype, proj.linetype Linetypes specific components. Set 0 lines. proj.fill Colour fill projection lines. NULL fill. Add alpha using e.g. scales::alpha(). Ignored proj = \"single\". plot Ggplot object plot inset. NULL, defaults ggplot object geom_magnify() added. Overrides axes set. Use inset_theme() give plot appropriate theme. shadow.args List. Arguments ggfx::with_shadow(). recompute Logical. TRUE, use lims() replot inset. Statistics, e.g. smoothing lines, recomputed using data target area. FALSE, use coord_cartesian() replot inset, keeping data. scale.inset Length 1 2 numeric. Normally, exactly target area shown inset. Sometimes may wish rescale plot inset. Use 2 numbers scale width height separately. proj.combine Logical. draw projection lines one polygon/map area magnified? FALSE draws one set projection lines area. TRUE draws single set lines areas. inherit.aes FALSE, overrides default aesthetics, rather combining . useful helper functions define data aesthetics inherit behaviour default plot specification, e.g. borders().","code":""},{"path":[]},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"aesthetics","dir":"Reference","previous_headings":"","what":"Aesthetics","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify understand following aesthetics (required aesthetics bold): can vectors length 4, like list(xmin, xmax, ymin, ymax). specify bottom left top right corners target area magnify, area magnified inset. lists can optionally named: list(xmin = 1, xmax = 2, ymin = 3, ymax = 4). Note: early versions ggmagnify used different order coordinates: list(xmin, ymin, xmax, ymax). Alternatively, can : data frame points two columns x y, grid::grob() object. Points within grob region (polygon spanned data frame) magnified. Points scale data, default.units = \"native\" grob. shape ignored. logical vector. Points data TRUE surrounded rectangle, ellipse outline. Normally set call geom_magnify(). can specify aesthetics, e.g. want different areas per facet. , may need wrap list() make sure length one per row data. first row per panel used. (magnify multiple areas one panel, use multiple calls geom_magnify().)","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"shapes","dir":"Reference","previous_headings":"","what":"Shapes","title":"Create a magnified inset of a plot — geom_magnify","text":"shape = \"ellipse\" elliptical area magnified. may include points within target area given . shape = \"outline\" convex hull drawn around points target area. works using geom_point() geom aesthetics x y. plotting map, \"outline\" magnifies exactly map features selected .","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"projection-lines","dir":"Reference","previous_headings":"","what":"Projection lines","title":"Create a magnified inset of a plot — geom_magnify","text":"proj = \"corresponding\" \"facing\" draws projection lines corners target corners inset. \"corresponding\" always projects corner target corner inset. \"facing\" sometimes draws lines facing corners, looks cleaner. non-rectangular insets, \"facing\" \"corresponding\" . \"single\" draws single line midpoint facing sides. draw lines, set proj.linetype = 0.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"limitations","dir":"Reference","previous_headings":"","what":"Limitations","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify() uses masks. requires R version 4.1.0 higher, graphics device supports masking. using knitr, may luck ragg_png device. device support masks, shape = \"rect\" work, plot inset clipped panel area. R graphics devices predictable. current recommendations : ragg_png knitr; cairo_pdf PDF output; RStudio AGG backend interactive output. mileage may vary. geom_magnify() uses dark magic deal faceting. may break older, newer, versions ggplot2. need faceting, want code robust upgrades, set options(ggmagnify.safe_mode = TRUE) use slightly less magic. design, geom_magnify() replots original plot using new limits. directly copy target area pixels. advantage can e.g. add axes, plot points appropriate size, zoom data invisible main plot, recompute derived graphics. want exact pixel--pixel copy, use different tool. geom_magnify() may break discrete scales. limitation ggplot2 now. Find bug? Report https://github.com/hughjonesd/ggmagnify/issues/.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"geom-magnify-tile-","dir":"Reference","previous_headings":"","what":"geom_magnify_tile()","title":"Create a magnified inset of a plot — geom_magnify","text":"geom_magnify_tile() version geom_magnify() uses different aesthetics. Set x, width, y, height to_x, to_width to_y, to_height specify target inset location.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/geom_magnify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a magnified inset of a plot — geom_magnify","text":"","code":"library(ggplot2) ggp <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(c(2, 6)) from <- list(2.5, 3.5, 6, 7) to <- list(4, 6, 5, 7) # Basic magnification ggp + geom_magnify(from = from, to = to) # Convex hull of points ggp + geom_magnify(aes(from = Species == \"setosa\"), to = c(3, 5, 6, 8), shape = \"outline\") # Order matters # `geom_magnify()` stores the plot when it is added to it: ggp + scale_color_brewer() + geom_magnify(from = from, to = to) # This will print the inset without the new scale: ggp + geom_magnify(from = from, to = to) + scale_color_brewer() # For more examples see https://github.com/hughjonesd/ggmagnify"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a grob from a subset of sf data — grob_where","title":"Create a grob from a subset of sf data — grob_where","text":"Create grob subset sf data","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a grob from a subset of sf data — grob_where","text":"","code":"grob_where(where, sf, crs = NULL)"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a grob from a subset of sf data — grob_where","text":"Logical condition evaluated sf. sf object class sf. crs Optional coordinate reference system.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a grob from a subset of sf data — grob_where","text":"grid::grob() can pass .","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/grob_where.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a grob from a subset of sf data — grob_where","text":"","code":"library(ggplot2) if (requireNamespace(\"sf\", quietly = TRUE) && requireNamespace(\"maps\", quietly = TRUE)) { usa <- sf::st_as_sf(maps::map(\"state\", fill=TRUE, plot = FALSE)) texas <- grob_where(ID == \"texas\", usa, crs = sf::st_crs(4326)) ggplot(usa) + coord_sf(crs = sf::st_crs(4326)) + geom_sf() + geom_magnify(from = texas, to = c(-90, -70, 25, 35), colour = \"red\", aspect = \"fixed\", expand = 0) } #> Coordinate system already present. Adding new coordinate system, which will #> replace the existing one."},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a theme suitable for an inset ggplot — inset_theme","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"Use inset_theme() add suitable theme manually-created inset plot. Use inset_blanks() customize default list elements blank inset.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"","code":"inset_theme( blank = inset_blanks(axes = axes), axes = c(\"\", \"x\", \"y\", \"xy\"), margin = if (axes == \"\") 0 else 8 ) inset_blanks(..., axes = c(\"\", \"x\", \"y\", \"xy\"))"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"blank Character vector theme elements blank. See ggplot2::theme(). axes String. axes plot inset? \"\", \"x\", \"y\" \"xy\". margin Margin around plot. See plot.margin ggplot2::theme(). ... Character vector extra elements blank.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"inset_theme() returns ggplot theme object. inset_blanks() returns character vector theme element names.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a theme suitable for an inset ggplot — inset_theme","text":"","code":"library(ggplot2) ggp <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) + geom_point() + xlim(c(2, 6)) from <- list(2.5, 3.5, 6, 7) to <- list(4, 6, 5, 7) blanks <- inset_blanks(\"panel.grid\") inset <- ggp + geom_density2d() + inset_theme(axes = \"\", blank = blanks) ggp + geom_magnify(from = from, to = to, plot = inset)"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper functions to find rectangles or convex hulls of data — rect_around","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"Helper functions find rectangles convex hulls data","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"","code":"rect_around(x, y, data = NULL, expand = 0) hull_around(x, y, data = NULL, expand = 0)"},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"x, y Unquoted names expressions data data frame expand Amount expand data around midpoint. Default 10 per cent.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"rect_around() returns list names xmin, xmax, ymin, ymax. hull_around() returns data frame columns x y.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/reference/rect_around.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper functions to find rectangles or convex hulls of data — rect_around","text":"","code":"library(ggplot2) to <- c(2, 4.5, 6, 8) setosas <- iris[iris$Species == \"setosa\", ] rect_around(Sepal.Width, Sepal.Length, data = setosas) #> $xmin #> [1] 2.3 #> #> $xmax #> [1] 4.4 #> #> $ymin #> [1] 4.3 #> #> $ymax #> [1] 5.8 #> hull_around(Sepal.Width, Sepal.Length, data = setosas) #> x y #> 1 3.6 4.6 #> 2 3.0 4.3 #> 3 2.3 4.5 #> 4 3.5 5.5 #> 5 3.8 5.7 #> 6 4.0 5.8 #> 7 4.4 5.7 #> 8 4.1 5.2"},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-041","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.4.1","title":"ggmagnify 0.4.1","text":"Bugfix: inset_theme() overridden explicitly passed-inset plot objects. Thanks @XanderDes.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-040","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.4.0","title":"ggmagnify 0.4.0","text":"New proj.fill argument fill area projection lines.","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-030","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.3.0","title":"ggmagnify 0.3.0","text":"New corners argument sets corner radius target inset. Thanks @thomasp85 help .","code":""},{"path":"https://hughjonesd.github.io/ggmagnify/news/index.html","id":"ggmagnify-020","dir":"Changelog","previous_headings":"","what":"ggmagnify 0.2.0","title":"ggmagnify 0.2.0","text":"can now logical vector points select. Use shape = \"outline\" magnify convex hull selected points. : xmin, ymin, xmax, ymax. Now: xmin, xmax, ymin, ymax. much easier think . can name arguments avoid confusion. Added proj.combine argument draw combined separate projection lines multiple target areas. Added helper functions find rectangles, convex hulls grobs. Added NEWS.md file track changes package.","code":""}] diff --git a/sitemap.xml b/sitemap.xml index d92d3f6..909f196 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -30,9 +30,6 @@ https://hughjonesd.github.io/ggmagnify/reference/index.html - - https://hughjonesd.github.io/ggmagnify/reference/inset_blanks.html - https://hughjonesd.github.io/ggmagnify/reference/inset_theme.html