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

Allow customizing carpet plot axis labels #137

Open
jhlegarreta opened this issue Oct 16, 2024 · 0 comments
Open

Allow customizing carpet plot axis labels #137

jhlegarreta opened this issue Oct 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jhlegarreta
Copy link
Collaborator

What would you like to see added in this software?

The carpet plot method assumes what is displayed on the x axis are time points:

xlabel = "time-points (index)"

For DWI, I think these should rather be diffusion gradient-encoding directions, so the x axis label should be a parameter of the method so that it can be changed.

Do you have any interest in helping implement the feature?

Yes

Additional information / screenshots

Slightly related, maybe I am not calling this method properly:

    fig = plt.figure(layout="tight")
    gs = gridspec.GridSpec(ncols=1, nrows=2, figure=fig)
    fig.suptitle("DWI signal carpet plot")

    divide_by_b0 = False
    gt_data, segments = nii_to_carpetplot_data(gt_nii, bvals=gtab.bvals, divide_by_b0=divide_by_b0)

    title = "Ground truth"
    plot_carpet(gt_data, segments, subplot=gs[0, :], title=title, **kwargs)

    gp_data, segments = nii_to_carpetplot_data(gp_nii, bvals=gtab.bvals, divide_by_b0=divide_by_b0)

    title = "Estimated (GP)"
    plot_carpet(gt_data, segments, subplot=gs[1, :], title=title, **kwargs)

    return fig

but the plot I get has the ylabel text cut:

Also, not sure where the vertical blue band I get in the upper subplot comes from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant