insightsengineering / goshawk

Functions that plot and summarize biomarkers/labs of interest
https://insightsengineering.github.io/goshawk/
Other
5 stars 1 forks source link

Add labels to lines #111

Open denisovan31415 opened 2 years ago

denisovan31415 commented 2 years ago

@junlueZH if user chooses to expand the axis range to let's say -20 to 70 then the additional ticks are displayed but don't have labels. using the spaghetti plot to illustrate. the ticks circled in red should have label of 60 and -10 respectively. I know there is no actual data at those expanded ranges but is it possible to get them labeled from the range entries of -20 to 70?

image

Originally posted by @npaszty in https://github.com/insightsengineering/teal.goshawk/issues/124#issuecomment-1057143386

gogonzo commented 2 years ago

@npaszty requested horizontal lines to be annotated on the axis (extra tick/break). There are some questions:

  1. What if there was multiple horizontal lines and axis was dominated by these extra ticks
  2. How to do it without breaking encapsulation of the horizontal/vertical lines
  3. Should it be implemented in geom_arb_hline, geom_range_hline, ...? Then they need to go on major refactor (again)
  4. Do we need another extra argument to control the labels?
  5. Do horizontal lines need extra axis ticks to locate them precisely?
gogonzo commented 2 years ago

This issue needs proper research and design before taking in to account current geom_arb_hline, geom_range_hline, ..., etc. functions

npaszty commented 2 years ago

@gogonzo @junlueZH if this is going to be a major refactor then that doesn't sound like it's worth it.