flav-io / flavio

A Python package for flavour physics phenomenology in the Standard model and beyond
http://flav-io.github.io/
MIT License
71 stars 61 forks source link

Improve plotting functions #144

Open peterstangl opened 3 years ago

peterstangl commented 3 years ago

As mentioned in issue #143,

DavidMStraub commented 3 years ago

I suggest not using something other than a list/array for levels because it's the same name as the argument of matplotlib's contour, which just takes an int or list/array.

I also suggest not using dictionaries as function arguments, because that's very hard to document and use properly (Jupyter tab signature hints; type hints; ...). If you want to go down this road, I suggest to add all of them as keyword arguments.

fpl.contour(
    x,
    y,
    z,
    *,
    levels: Optional[Sequence[int]] = None,
    n_sigma: Optional[Sequence[int]] = None,
    dof: int = 2,
    type: str = "chi2",
)