Skip to content

refactor(postproc): make birth event legend label an argument

Arin Wongprommoon requested to merge issue-036 into dev

WHY IS THIS CHANGE NEEDED?:

  • when using single_birth_plot routine, user can change the label in the legend that indicates birth events

HOW DOES THE CHANGE SOLVE THE PROBLEM?:

  • remove hard-coding of the 'birth event' label by making it an argument with the default of 'birth event'.
  • this preserves backwards compatibility as i'm creating a new argument and the existing argument names are the same

WHAT SIDE EFFECTS DOES THIS CHANGE HAVE?:

  • backwards compatibility: existing uses of this routine in scripts will produce 'budding event' in plots rather than 'birth event'; if a user wants to use 'birth event', they can simply define the argument birth_label='birth event'.

EVIDENCE THAT COMMIT WORKS:

  • works with a random time series and a binary mask-like numpy array, and i can change the legend label

REFERENCES:

Merge request reports