Giter VIP home page Giter VIP logo

Comments (4)

thomasp85 avatar thomasp85 commented on June 2, 2024 1

Not impolite at all. However, the release version of ggfx handles geom_sf() just fine so there is no need to jump through any hoops to get it workingπŸ™‚

from ggfx.

thomasp85 avatar thomasp85 commented on June 2, 2024

Thank you for the report - it is an oversight on my part. geom_sf() returns a list instead of a layer and I didn't plan for that

from ggfx.

k-hench avatar k-hench commented on June 2, 2024

I hope it is not impolite to comment on a closed issue 🀭
Yet, I wanted to give a quick heads up since I regularly use {ggfx} with geom_sf() and it works just fine.
I simply catch the first element of said returned list - like so:

library(rnaturalearth)
library(sf)
library(ggfx)
library(ggplot2)

canada <- ne_states(country = "Canada", returnclass = "sf")

canada_inset <- st_buffer(canada, -.7)

ggplot() +
  as_reference(
    geom_sf(data = canada_inset)[[1]],
    id = 'inset' ) +
  geom_sf(data = canada) +
  with_blend(
    with_blur( geom_sf(data = canada_inset,
                       size = 3,
                       color = rgb(0,0,0,.4), 
                       fill = "transparent")[[1]],
               sigma = 3),
    bg_layer = 'inset',
    blend_type = 'in') +
  coord_sf(crs = 3347)

(link to the plot on imgur - I believe it is not displayed on github...)

Created on 2021-04-08 by the reprex package (v2.0.0)

from ggfx.

k-hench avatar k-hench commented on June 2, 2024

awesome - I missed that update πŸ‘ 🀩

from ggfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.