ENH: background detection in plotting
Use fast percentile
Reorganize imports