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

Plots in the processing choppers notebook don't show all data #597

Closed
jl-wynen opened this issue Jan 31, 2025 · 4 comments · Fixed by #598
Closed

Plots in the processing choppers notebook don't show all data #597

jl-wynen opened this issue Jan 31, 2025 · 4 comments · Fixed by #598
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jl-wynen
Copy link
Member

The plateau plots in https://scipp.github.io/scippneutron/user-guide/chopper/processing-nexus-choppers.html don't show the data properly. This is because of scipp/plopp#407

@jl-wynen jl-wynen added the documentation Improvements or additions to documentation label Jan 31, 2025
@jl-wynen jl-wynen moved this from Triage to Selected in Development Board Jan 31, 2025
@nvaytet
Copy link
Member

nvaytet commented Jan 31, 2025

In that notebook, can't we use

import plopp as pp

pp.plot({'a': a, 'b': b})

instead of going through MPL?

@nvaytet
Copy link
Member

nvaytet commented Jan 31, 2025

Ot just use a DataGroup?

def plot_plateaus(raw_data: sc.DataArray, plateaus: sc.DataArray) -> None:
    to_plot = sc.DataGroup({'raw_data': raw_data})
    for plateau in plateaus:
        i = plateau.coords['plateau'].value
        to_plot[str(i)] = sc.DataArray(
            plateau.data.broadcast(dims=['time'], shape=[2]),
            coords={'time': plateau.coords['time']},
            name=f'Plateau {i}')
    return to_plot.plot()

@jl-wynen
Copy link
Member Author

We can. But that makes handling markers, colors, etc more awkward.

@nvaytet
Copy link
Member

nvaytet commented Feb 1, 2025

@jl-wynen jl-wynen changed the title Plots in the processing choppers notebook don't show all datat Plots in the processing choppers notebook don't show all data Feb 3, 2025
@jl-wynen jl-wynen self-assigned this Feb 3, 2025
@jl-wynen jl-wynen moved this from Selected to In progress in Development Board Feb 3, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in Development Board Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants