[Python] Running median of y-values over a range of x

Discussão em 'Python' iniciado por Stack, Junho 3, 2025.

  1. Stack

    Stack Membro Participativo

    Below is a scatter plot I constructed from two numpy arrays.

    Scatter Plot Example [​IMG]

    What I'd like to add to this plot is a running median of y over a range of x. I've photoshoped in an example:

    Modified Scatter Plot [​IMG]

    Specifically, I need the median for data points in bins of 1 unit along the x axis between two values (this range will vary between many plots, but I can manually adjust it). I appreciate any tips that can point me in the right direction.

    Continue reading...

Compartilhe esta Página