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

FIX: fix AttributeError Xtick has no attribute label #84

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions nireports/reportlets/nuisance.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,10 +886,10 @@
sns.heatmap(corr, linewidths=0.5, cmap="coolwarm", center=0, square=True, ax=ax0)
ax0.tick_params(axis="both", which="both", width=0)

for tick in ax0.xaxis.get_major_ticks():
tick.label.set_fontsize("small")
for tick in ax0.yaxis.get_major_ticks():
tick.label.set_fontsize("small")
for label in ax0.xaxis.get_majorticklabels():
label.set_fontsize("small")

Check warning on line 890 in nireports/reportlets/nuisance.py

View check run for this annotation

Codecov / codecov/patch

nireports/reportlets/nuisance.py#L890

Added line #L890 was not covered by tests
for label in ax0.yaxis.get_majorticklabels():
label.set_fontsize("small")

Check warning on line 892 in nireports/reportlets/nuisance.py

View check run for this annotation

Codecov / codecov/patch

nireports/reportlets/nuisance.py#L892

Added line #L892 was not covered by tests
sns.barplot(
data=gscorr,
x="index",
Expand All @@ -905,11 +905,11 @@
ax1.tick_params(axis="x", which="both", width=0)
ax1.tick_params(axis="y", which="both", width=5, length=5)

for tick in ax1.xaxis.get_major_ticks():
tick.label.set_fontsize("small")
tick.label.set_rotation("vertical")
for tick in ax1.yaxis.get_major_ticks():
tick.label.set_fontsize("small")
for label in ax1.xaxis.get_majorticklabels():
label.set_fontsize("small")
label.set_rotation("vertical")

Check warning on line 910 in nireports/reportlets/nuisance.py

View check run for this annotation

Codecov / codecov/patch

nireports/reportlets/nuisance.py#L909-L910

Added lines #L909 - L910 were not covered by tests
for label in ax1.yaxis.get_majorticklabels():
label.set_fontsize("small")

Check warning on line 912 in nireports/reportlets/nuisance.py

View check run for this annotation

Codecov / codecov/patch

nireports/reportlets/nuisance.py#L912

Added line #L912 was not covered by tests
for side in ["top", "right", "left"]:
ax1.spines[side].set_color("none")
ax1.spines[side].set_visible(False)
Expand Down
18 changes: 9 additions & 9 deletions nireports/reportlets/xca.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ def plot_melodic_components(
ax2.autoscale_view("tight")
ax2.tick_params(axis="both", which="major", pad=0)
sns.despine(left=True, bottom=True)
for tick in ax2.xaxis.get_major_ticks():
tick.label.set_fontsize(6)
tick.label.set_color(color_time)
for label in ax2.xaxis.get_majorticklabels():
label.set_fontsize(6)
label.set_color(color_time)

ax3.plot(
f[0:],
Expand All @@ -222,9 +222,9 @@ def plot_melodic_components(
ax3.axes.get_yaxis().set_visible(False)
ax3.autoscale_view("tight")
ax3.tick_params(axis="both", which="major", pad=0)
for tick in ax3.xaxis.get_major_ticks():
tick.label.set_fontsize(6)
tick.label.set_color(color_power)
for label in ax3.xaxis.get_majorticklabels():
label.set_fontsize(6)
label.set_color(color_power)
sns.despine(left=True, bottom=True)

plt.subplots_adjust(hspace=0.5)
Expand Down Expand Up @@ -358,9 +358,9 @@ def compcor_variance_plot(

ax[m].set_yticks([])
ax[m].set_yticklabels([])
for tick in ax[m].xaxis.get_major_ticks():
tick.label.set_fontsize("x-small")
tick.label.set_rotation("vertical")
for label in ax[m].xaxis.get_majorticklabels():
label.set_fontsize("x-small")
label.set_rotation("vertical")
for side in ["top", "right", "left"]:
ax[m].spines[side].set_color("none")
ax[m].spines[side].set_visible(False)
Expand Down