position_logo: Logo positioning for overlapping objects on top of one...

View source: R/position.r

position_logoR Documentation

Logo positioning for overlapping objects on top of one another.

Description

position_classic is stacking objects in an ordered fashion from largest to smallest element, position_logo reverses the classic order and additionally shifts stacks downward to align the largest objects along their vertical minimum, position_fill additionally standardises each stack to have unit height.

Usage

position_logo()

position_classic()

See Also

See geom_logo for more examples.

Examples


library(ggplot2)
data(sequences)

# to make the most of comparisons, largest letters ar aligned along their minimum to
# work out the main sequence.
ggplot(data = ggfortify(sequences, peptide, treatment = class)) +
  geom_logo(aes(x = class, y = bits, fill = Water, label = element), position="logo") +
  facet_wrap(~position)

# in the classic logo plots letters are stacked in an ordered fasahion on top of each other
ggplot(data = ggfortify(sequences, peptide, treatment = class)) +
  geom_logo(aes(x = class, y = bits, fill = Water, label = element), position="classic") +
  facet_wrap(~position)


heike/gglogo documentation built on Feb. 3, 2024, 1:45 p.m.