seaborn icon indicating copy to clipboard operation
seaborn copied to clipboard

Consider adding regex or wildcard specification of variables in Plot.pair

Open mwaskom opened this issue 2 years ago • 1 comments

e.g.

Plot(penguins, y="body_mass_g").pair(x="bill_")

or

Plot(penguins, y="body_mass_g").pair(x=".+_mm$")

One question: regex matching or some simpler glob-style wildcard matching, perhaps with a negation operator? (e.g. x=!bill_*")

Regex is more flexible but trickier to work with for some common applications in this application (i.e., anti-match on a common prefix). Regex is maybe marginally less familiar to people, but still probably the way to go.

mwaskom avatar Aug 26 '22 00:08 mwaskom

For what it's worth I've had to make similar charts (usually scatter matrices) where I had to drop some columns like ID, dates so a built-in 'negation' will be helpful.

Also, even if regex is overall less familiar to people it is a standard known syntax (with many debug resources) which should simplify adoption in long term.

Rabeez avatar Oct 12 '22 09:10 Rabeez