hrbrmstr / ggalt

:earth_americas: Extra Coordinate Systems, Geoms, Statistical Transformations & Scales for 'ggplot2'
https://cran.r-project.org/web/packages/ggalt/vignettes/ggalt_examples.html
Other
665 stars 98 forks source link

Revert "Easy labels with geom_bars when position="fill" or position="stack"" #43

Closed hrbrmstr closed 7 years ago

hrbrmstr commented 7 years ago

Reverts hrbrmstr/ggalt#15 The label positions are not accurate. I ran the examples:

ggplot(as.data.frame(Titanic)) +
  aes(x = Class, fill = Survived, weight = Freq) +
  geom_bar() + stat_stack_labels()
ggplot(as.data.frame(Titanic)) +
  aes(x = Class, fill = Survived, weight = Freq) +
  geom_bar() + geom_label(stat = "stack_labels")
ggplot(as.data.frame(Titanic)) +
  aes(x = Class, fill = Survived, weight = Freq) +
  geom_bar() + stat_stack_labels() + facet_grid(~Sex)
ggplot(as.data.frame(Titanic)) +
  aes(x = as.integer(Class), fill = Survived, weight = Freq) +
  geom_area(stat = "count") + stat_stack_labels()

And they don't seem to be where they should be.

larmarange commented 7 years ago

Dear @hrbrmstr , I'm truly sorry. Due to some changes in recent versions of ggplot2, these functions had to be updated (cf. https://github.com/larmarange/JLutils/commit/74af35d636d80d2ec2a772cebd3c7954aba98b8e#diff-508ea6fd25e9fb23be63d54af4538628 , NB: I have a copy of these functions elsewhere).

However, I completely forgot to update the pull request (which was developed almost 1.5 year ago).

Do you want me to propose a new and updated pull request?

Best regards