Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show number of year-on-year slopes in degradation summary plot #298

Open
kandersolar opened this issue Oct 19, 2021 · 0 comments
Open

Show number of year-on-year slopes in degradation summary plot #298

kandersolar opened this issue Oct 19, 2021 · 0 comments

Comments

@kandersolar
Copy link
Member

Is your feature request related to a problem? Please describe.
Sometimes it is handy to know how many year-on-year slopes made it into the final histogram, for example when evaluating different data filtering strategies.

Describe the solution you'd like
Show the number of year-on-year slopes on the summary plot next to the Rd and CI values, something like this:

image

Describe alternatives you've considered
It is possible to DIY after calling degradation_summary_plots, courtesy of @mdeceglie:

def get_annotations(ax):
    annotations = [child for child in ax.get_children() if isinstance(child, matplotlib.text.Annotation)]
    return annotations

n_values = ta.results['sensor']['yoy_degradation']['calc_info']['YoY_values'].notnull().sum()
fig = ta.plot_degradation_summary('sensor')
note = get_annotations(fig.axes[1])[0]
newtext = note.get_text() + f'\n# values = {n_values}'
note.set_text(newtext)
note.set_position((0.55, 0.6))

Additional context
Folks thought it was a good idea to only add this to the annotation when detailed=True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants