Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jan 2, 2017

Hi. I read this bug: #1546
Fill aesthetic does not show in the legend guide for stat_summary
And i want to contribute for its solution.
The results:

# using default summary function fill in the legend 
ggplot(mtcars, aes(cyl ,mpg,col=factor(am),fill=factor(am))  )+
  geom_point()+
  stat_summary(aes(cyl,mpg), geom = "smooth")

rplot01

# without the parameter "geom=smooth" no fill in the legend 
ggplot(mtcars, aes(cyl ,mpg,col=factor(am),fill=factor(am))  )+
  geom_point()+
  stat_summary()

rplot02

# geom smooth with parameter "se=FALSE" no fill in the legend.
ggplot(mtcars, aes(cyl,mpg,col=factor(am),fill=factor(am))  )+
  geom_point()+
  geom_smooth(se=FALSE)

rplot03

@hadley
Copy link
Member

hadley commented Jan 3, 2017

Can you please:

  • Rebase against master so that you get the existing travis fix
  • Remove the appyveyor file
  • Change the title of the pull request to describe the issue
  • Include closes #1546 in one of the commit messages

I'll do a more detailed code review after that

Rebase against master so that you get the existing travis fix
@ghost ghost changed the title Fix bug #1546 Proposal for fix bug #1546 Jan 7, 2017
@ghost
Copy link
Author

ghost commented Jan 8, 2017

Excuse me for my delay. Your requirements are ready.

@hadley
Copy link
Member

hadley commented Jan 24, 2017

Can you please update the title of this PR (and your others) to be informative. I don't know the indices of the ggplot2 bugs off the top of my head.

@ghost ghost changed the title Proposal for fix bug #1546 Fix bug #1546: Fill aesthetic does not show in the legend guide for stat_summary Jan 25, 2017
@ghost
Copy link
Author

ghost commented Jan 25, 2017

Your requirements are ready again.

@hadley
Copy link
Member

hadley commented Jan 25, 2017

You don't need to repeat the bug name in the PR title. Just write it as the positive statement, e.g. "Show fill in the legend for stat_summary"

@ghost ghost changed the title Fix bug #1546: Fill aesthetic does not show in the legend guide for stat_summary Fix bug: Fill aesthetic does not show in the legend guide for stat_summary Jan 25, 2017
@ghost
Copy link
Author

ghost commented Jan 25, 2017

Ready!

Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also add a bullet to NEWS describing this change?

after_success:
- Rscript -e 'covr::codecov()'

before_install:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please delete this?

R/legend-draw.r Outdated

grobTree(
if (isTRUE(params$se)) rectGrob(gp = gpar(col = NA, fill = data$fill)),
if (isTRUE(params$se) | is.null(params$se)) rectGrob(gp = gpar(col = NA, fill = data$fill)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be || and not |

@hadley
Copy link
Member

hadley commented Jul 13, 2017

@Emanuelcontreras are you interested in finishing this off?

@ghost

This comment has been minimized.

@clauswilke
Copy link
Member

Closing this PR. The issue was resolved via #2567.

@clauswilke clauswilke closed this May 12, 2018
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

Successfully merging this pull request may close these issues.

2 participants