supporting kwargs in allantools.Plot.plot
Closed this issue · 3 comments
Justin318 commented
Please allow user to supply kwargs to the method plot for the class allantools.Plot
def plot(self, atDataset, errorbars=False, grid=False, **kwargs):
"""overwriting the implementation from allantools
Args:
atDataset:
errorbars:
grid:
Returns:
"""
if errorbars:
self.ax.errorbar(atDataset.out["taus"],
atDataset.out["stat"],
yerr=atDataset.out["stat_err"],
**kwargs
)
else:
self.ax.plot(atDataset.out["taus"],
atDataset.out["stat"],
**kwargs
)
self.ax.set_xlabel("Tau")
self.ax.set_ylabel(atDataset.out["stat_id"])
self.ax.grid(grid, which="minor", ls="-", color='0.65')
self.ax.grid(grid, which="major", ls="-", color='0.25')
MedericFourmy commented
I would like to have this as well, any plan for a merge request?
aewallin commented
hi @Justin318 and @MedericFourmy , I would be happy to merge a pull-request with the suggested kwargs.
- please check that the new code does not break any existing test
- it's a good idea to provide some test or example code together with the enhancement
yxie-git commented
I sent a pull request by two plot functions that I'm using currently to generate stable32 style plots. Maybe it's relevant to this issue?
As a github starter, I'm not sure if I manipulated this 'pull request' correctly or do I need to write the code in plotclass? Sorry for the inconvenience if something is wrong with the uploading.