Move plot styling options out of kwargs #70
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before introducing classes like
ApplicationStyle
, passing all styling options viakwargs
made sense. Now that there are effectively separatekwargs
lists for different aspects of the plot, those options should be exposed as part of the interface.Related issues
Closes #46.
Proposed changes
kwargs
.*
tocascade
andnavchart
to separate positional arguments from keyword arguments.While working on this I realized an advantage of the
matplotlib
-style list ofkwargs
that I hadn't noticed before. Withkwargs
, it is very easy to define shorthands because everything is just a key in a dictionary (e.g.,linestyle
andls
refer to the same option).We should be cognizant of the fact that documenting options like
application_style
as part of the interface may make it harder to define such shorthands. We might want to adopt shorter names now (e.g.,app_style
) or maybe find a way to have consistent argument names acrosscascade
andnavchart
(e.g.,style=(PlatformStyle(...), ApplicationStyle(...))
)?I think we can address this in a future PR, but I'm interested in what you think @swright87 and @laserkelvin.