Add annotate_npc()

Create issue
Issue #24 resolved
Pedro J. Aphalo repo owner created an issue

Add a function annotate_npc() supporting the npcx and npcy aesthetics added in 'ggpmisc' 0.3.1. This function would accept only the "npc" versions of geoms. One would need to also add a wrapper on annotate() from 'ggplot2' to give a meaningful error when called with one the these "npc" geoms, instead of silently failing to add a visible layer. Another option, that I would rather avoid, would be to have the wrapper dispatch the call based on the name of the geom, as this would make the interface confusing.

Comments (3)

  1. Pedro J. Aphalo reporter

    I implemented a variation on annotate() that overrides ggplot2::annotate() and supports the new position aesthetics npcx and npcy, while remaining fully compatible.

  2. Log in to comment