Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior with_mask and with_shadow output #30

Open
marcoaurelioguerrap opened this issue Feb 3, 2024 · 0 comments
Open

Unexpected behavior with_mask and with_shadow output #30

marcoaurelioguerrap opened this issue Feb 3, 2024 · 0 comments

Comments

@marcoaurelioguerrap
Copy link

Hi, I found what I think is a bug when you combine with_mask and with_shadow. I think the shadow is being put on top of the used path.

# Suspected bug
ggplot(df) +
  geom_path(aes(x,y),
            color="#4bc4ff",linewidth=20,lineend="round" ) +
  with_shadow(
    geom_path(data=df[-3,],aes(x,y),
            color="blue",linewidth=20,lineend="round" ),
    stack=TRUE,x_offset = 0,y_offset = 0,sigma = 20,id="bar") +
  with_mask(
    geom_path(data=df,
              aes(x,y),
              linewidth=20,lineend='round'),
    mask=ch_alpha('bar')
  )

# Desired output
ggplot(df) +
  geom_path(aes(x,y),
            color="#4bc4ff",linewidth=20,lineend="round" ) +
  with_shadow(
    geom_path(data=df[-3,],aes(x,y),
              color="blue",linewidth=20,lineend="round" ),
    stack=FALSE,x_offset = 0,y_offset = 0,sigma = 20,id="bar") +
  with_mask(
    geom_path(data=df,
              aes(x,y),
              linewidth=20,lineend='round'),
    mask=ch_alpha('bar')
  ) +
  geom_path(data=df[-3,],aes(x,y),
            color="blue",linewidth=20,lineend="round" )


Expected output:
image

Actual output:
image

@marcoaurelioguerrap marcoaurelioguerrap changed the title Unexpected with_mask and with_shadow output Unexpected behavior with_mask and with_shadow output Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant