Skip to content

lineplot support fixed y-value of annotation #189

Description

@pas-calc

Currently seaborn lineplot is not officially supported ( like Annotator(..., plot="boxplot", .. ) init ) but could be nice to have.

Neither could I acheive it using line_offset_to_group=1 , use_fixed_offset=True.

A workaround would be to modify this relevant line where the value is calculated (y-value in axis coords 0...1 = bottom...top)

value = self._get_value_for_pair(i_value_max_in_range_g1_g2)

like to not calculate it but something like

        if fixed_val is not None:
            print("use fixed val")
            value=fixed_val

The header here needs to be adapted

def annotate(self, line_offset=None, line_offset_to_group=None):

and then passed
self._annotate_pair(
annotation,
ax_to_data=ax_to_data,
ann_list=ann_list,
orig_value_lim=orig_value_lim,
)

Then instead of using annotator.apply_and_annotate() , we do


annotator.configure( ... , line_width=0 ,  ) # hide the bar

annotator.apply_test()
annotator.annotate(fixed_val=1)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions