[Python] adding a vertical line to plot using seaborn object interface

Discussão em 'Python' iniciado por Stack, Dezembro 8, 2024.

  1. Stack

    Stack Membro Participativo

    I am trying to use seaborn object interface. It looks intuitive like ggplot2 in R. However, since it is still in development stage, the underlying documentation is still WIP.

    For example I am trying to add a vertical line at let's say x=5. How could I do so using the object interface.

    import seaborn.objects as so
    r=fmri[(fmri['event']=='stim') ].reset_index()
    (
    so.Plot(r, x="timepoint", y="signal",color='subject')
    .facet(row="region", wrap=2)
    .add(so.Line())
    )

    Continue reading...

Compartilhe esta Página