serpent-tools
serpent-tools copied to clipboard
DEP Deprecate steps plot argument in favor of matplotlib drawstyle
Initially brought up in #432 for the HomogUniv
class. As we start forwarding more plot options to the underlying matplotlib plot functions (#417, #423, #422 and friends) there may be a point where we want to rely on users passing drawstyle=<option>
rather than our own logic for the step
argument.
Some examples
https://github.com/CORE-GATECH-GROUP/serpent-tools/blob/67dc469e2697dfffbd6c06fa1bc20eea306383c9/serpentTools/objects/containers.py#L411 https://github.com/CORE-GATECH-GROUP/serpent-tools/blob/67dc469e2697dfffbd6c06fa1bc20eea306383c9/serpentTools/detectors.py#L561-L566 https://github.com/CORE-GATECH-GROUP/serpent-tools/blob/67dc469e2697dfffbd6c06fa1bc20eea306383c9/serpentTools/objects/xsdata.py#L363 https://github.com/CORE-GATECH-GROUP/serpent-tools/blob/67dc469e2697dfffbd6c06fa1bc20eea306383c9/serpentTools/parsers/sensitivity.py#L408-L409
Roadmap
I propose that by 0.10.0 we support passing steps
and drawstyle
for the methods that currently support steps
. Methods like the sensitivity plotter can have a default drawstyle
using kwargs.setdefault("drawstyle", ...)
.
Instances where both are passed should raise a DeprecationWarning by 0.10.0. Following 0.11.0 we should no longer support the steps
argument, instead falling back to the matplotlib drawstyle
argument.
Instances where we currently allow steps
and additional kwargs
should raise a pending deprecation warning by 0.9.4
Extras
Some care should be taken for the spectrum plot and other cases where we perform a line plot with some uncertainties. Here we wish to draw the errorbars in the middle of the bin (#428)