wilkelab / cowplot

cowplot: Streamlined Plot Theme and Plot Annotations for ggplot2
https://wilkelab.org/cowplot/
704 stars 84 forks source link

merge `draw_text` into `draw_label` #77

Open tbates opened 7 years ago

tbates commented 7 years ago

Instead of maintaining draw_text and draw_label, it would be nice to just allow the (more capable) draw_label to take vectors of text, x, and y, check the lengths match, and call itself to execute each in turn.

One might then deprecate draw_text

clauswilke commented 7 years ago

A few comments:

  1. In principle, I agree that having two separate functions is not desirable.

  2. I'm happy to consider a pull request.

  3. It would have to be verified that the more capable draw_text behaves exactly like the old one for regular text input. A lot of code is out there in the world using draw_text, and people shouldn't have to update all their figure-drawing code because of a minor improvement in the package.