diff --git a/nireports/reportlets/nuisance.py b/nireports/reportlets/nuisance.py index ca1baa5c..40c76c7d 100644 --- a/nireports/reportlets/nuisance.py +++ b/nireports/reportlets/nuisance.py @@ -886,10 +886,10 @@ def confounds_correlation_plot( 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") + for label in ax0.yaxis.get_majorticklabels(): + label.set_fontsize("small") sns.barplot( data=gscorr, x="index", @@ -905,11 +905,11 @@ def confounds_correlation_plot( 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") + for label in ax1.yaxis.get_majorticklabels(): + label.set_fontsize("small") for side in ["top", "right", "left"]: ax1.spines[side].set_color("none") ax1.spines[side].set_visible(False) diff --git a/nireports/reportlets/xca.py b/nireports/reportlets/xca.py index 8fdaa7f9..a97e4c19 100644 --- a/nireports/reportlets/xca.py +++ b/nireports/reportlets/xca.py @@ -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:], @@ -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) @@ -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)