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

An extra grey line behind the quantile plot #17

Open
xuzhenwu opened this issue Feb 22, 2021 · 2 comments
Open

An extra grey line behind the quantile plot #17

xuzhenwu opened this issue Feb 22, 2021 · 2 comments

Comments

@xuzhenwu
Copy link

I found an extra grey line behind the quantile plot, which is slightly different from the results in
https://flr-project.org/ggplotFL/reference/geom_flquantiles.html

data(ple4)
flq <- rnorm(250, catch(ple4), 200000)
ggplot(flq, aes(x=date, y=data)) +
  geom_flquantiles(probs=c(0.25, 0.75), fill="red", alpha=0.25)

bugs
bugs1

@iagomosqueira
Copy link
Member

iagomosqueira commented Feb 22, 2021

geom_flquantiles assumes probs is of an odd length, and the middle value is taken to be a central tendency, usually the median (0.50) and shown using geom_line. This has now been corrected, and geom_line is not called if probs has an even length.

The examples on the website have now been corrected.

@iagomosqueira
Copy link
Member

geom_flquantiles now sets size = 0 in call to GeomRibbon, so linestyle or colour specifications only affect GeomLine. probs should specify 2 values for the ribbon, and 3 to get line and ribbon. Examples now reflect this.

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

2 participants