I create a barplot with matplotlib, which has two groups of data, and the x-axis is drawn only under the sets of bars drawn, and not along the entire figure.
Initially, a figure with 6 subplots is declared, and then, within a for loop, they are plotted "two by two"
fig_bac = plt.subplots(2, len(salinidades), sharey= True, figsize=(11, 9))
axes_bac = fig_bac[0].get_axes()
Inside the for
ax_s1.bar(tickpos, mean_graf1_bac, width=width, yerr=std_graf1_bac,
color=colors_bac, edgecolor='black')
ax_s2.bar(tickpos, mean_graf2_bac, width=width, yerr=std_graf2_bac,
color=colors_bac, edgecolor='black')
The graph is inside a for, which takes the axes of a subplot generated before and is plotting the barplots "two by two".
Any idea how to solve it? I find other forum entries with label problems but nothing with the axis line itself.
Thanks