Closed etiennebacher closed 7 months ago
I like it but I think it will be complex. In particular, it's easy to draw the magnified inset over the shaded area. But the target area isn't redrawn. So you have to draw an irregular shaded shape, between the two projection lines and not including the target area. (Which can be elliptical or even an arbitrary shape...!)
Sorry, but I think this is best done with a manual tool. I'll leave this request open though, and if enough people vote for it I will reconsider.
OK, this got some votes. It's now enabled in the experiment-shaded-projection
branch, if you want to try it out. Just add e.g. proj.fill = alpha("grey", 0.2)
to a geom_magnify
call.
Warning: at present, using a ragg
device on my machine (including the ragg RStudio backend) this causes a segfault. See https://github.com/r-lib/ragg/issues/156. It seems to work OK with quartz or cairo backends. I'm actively investigating this.
This should now be in master and should no longer segfault.
That's awesome, thanks!
Hi, this is a very nice package! It would be cool if it was possible to fill the area between the lines so that we can get the red area like below:
Here's the code I have so far (coming from this SO answer):
Add a 👍 on this post to show support for this feature.