From 52e6d3caf76fe42d0e1ae5549bba669dd532d31c Mon Sep 17 00:00:00 2001 From: Lee Phillips Date: Fri, 1 Oct 2021 10:41:41 -0600 Subject: [PATCH] Allow styling of magnification shape in lens!() The guide lines that indicate the region of the plot magnified in the inset lens plot, called the magnification shape, are hard-coded with the :lightgray color and are drawn with the default other line attributes. This is often too light to be seen clearly and could be a problem for publication. This commit allows the user to set the linecolor, linewidth, and linestyle in the call to lens!(). --- src/recipes.jl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/recipes.jl b/src/recipes.jl index d97d1f0d..8ce87bcc 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1042,7 +1042,17 @@ export lens! series_plotindex := backup[:series_plotindex] seriestype := :path primary := false - linecolor := :lightgray + if haskey(backup, :linecolor) + linecolor := backup[:linecolor] + else + linecolor := :lightgray + end + if haskey(backup, :linestyle) + linestyle := backup[:linestyle] + end + if haskey(backup, :linewidth) + linewidth := backup[:linewidth] + end bbx_mag = (x1 + x2) / 2 bby_mag = (y1 + y2) / 2 xi_lens, yi_lens =