From f06225655d29ee8f479defd4acdc4360ad0c1477 Mon Sep 17 00:00:00 2001 From: Lee Phillips Date: Mon, 4 Oct 2021 09:38:59 -0600 Subject: [PATCH] Allow styling of magnification shape in lens!() (#3860) * 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!(). * Update src/recipes.jl Co-authored-by: t-bltg * Update .zenodo.json Co-authored-by: t-bltg Co-authored-by: Simon Christ --- .zenodo.json | 6 ++++++ src/recipes.jl | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.zenodo.json b/.zenodo.json index f1c2c63e..439b6334 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -696,6 +696,12 @@ { "name": "Jan Thorben Schneider", "type": "Other" + }, + { + "orcid": "0000-0003-4102-2460", + "affiliation": "Alogus Research Corporation:, + "name": "Lee Phillips", + "type": "Other" } ], "upload_type": "software" diff --git a/src/recipes.jl b/src/recipes.jl index d97d1f0d..ef045446 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1042,7 +1042,13 @@ export lens! series_plotindex := backup[:series_plotindex] seriestype := :path primary := false - linecolor := :lightgray + linecolor := get(backup, :linecolor, :lightgray) + 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 =