Move plot configuration arguments out of kwargs
#46
Labels
enhancement
New feature or request
Milestone
kwargs
#46
Feature/behavior summary
Looking at
p3.plot.backend.matplotlib.CascadePlot
's function signature, options to change plot styling (e.g. adding more markers in #45) are somewhat hidden askwargs
, which feels like a little unintuitive for users.In most design patterns,
kwargs
is used to unpack into functions/classes being called within the function without needing to specify every single signature. The argument being made here is that things likeapplication_style
are actually commonly used and explicitly part ofCascadePlot
's usage/definition, and should be correspondingly explicitly exposed.Request attributes
Related issues
#42, #45
Solution description
Using the
matplotlib
CascadePlot
as an example, I'm proposing to refactor the__init__
call; I'm using type hints to make it more obvious:Additional notes
I've highlighted
ApplicationStyle
in this case because it feels like something a user will most likely want to configure. Legends andplatform_style
are somewhat less likely, and could be kept inkwargs
but I guess for consistency could be moved into optionalargs
as well.The text was updated successfully, but these errors were encountered: