ggbio icon indicating copy to clipboard operation
ggbio copied to clipboard

The 'group' aesthetic for geom 'alignment'

Open lawremi opened this issue 12 years ago • 1 comments

This code: "autoplot(gra, aes(fill = group, group = group), geom = "alignment")" results in each group being given a separate 'y' coordinate. Why then do we not just use 'y' as the aesthetic? If we could use 'y' there, then the 'group' aesthetic would always be "non-selfish", so we would not need a group.selfish argument.

lawremi avatar Apr 13 '12 20:04 lawremi

the default stat is "stepping" for alignment, we use "stepping" value as y, if you drill down to details, the addStepping have "group.selfish" argument, this is useful, when you want to show each group on the save level. This means stat:stepping doesn't allow you to specify "y".

For most goem and stat, there is stat "identity" mode, it allows you to use "y" aesthetics mapping, but for "alignment" you will find it's now allowed for flexible "y" mapping, because for alignment it almost always need a grouping method, because we have to show "gaps" in between. If you specify "y" as value, you cannot figure out any gaps, it's just geom_rect.

On Fri, Apr 13, 2012 at 3:26 PM, lawremi < [email protected]

wrote:

This code: "autoplot(gra, aes(fill = group, group = group), geom = "alignment")" results in each group being given a separate 'y' coordinate. Why then do we not just use 'y' as the aesthetic? If we could use 'y' there, then the 'group' aesthetic would always be "non-selfish", so we would not need a group.selfish argument.


Reply to this email directly or view it on GitHub: https://github.com/tengfei/ggbio/issues/14

Tengfei Yin MCDB PhD student 1620 Howe Hall, 2274, Iowa State University Ames, IA,50011-2274 Homepage: www.tengfei.name

tengfei avatar Apr 13 '12 21:04 tengfei