I am trying to clearly visualise the plot as shown below, as the x-axis is extremely congested. I am using matplotlib for producing the plots, and I would like to separate out this plot below into 5 different "smaller" plots, based on the x-axis names (labels
in the code below). Is there a way to do it in matplotlib ?
My code is as below -
plt.hlines([-1, 1], -0.5, len(pulls) - 0.5, colors="k", linestyles="dashdot")
plt.fill_between([-0.5, len(pulls) - 0.5], [-2, -2], [2, 2], facecolor="#a8cee2")
plt.fill_between([-0.5, len(pulls) - 0.5], [-1, -1], [1, 1], facecolor="#388ebc")
plt.hlines([0], -0.5, len(pulls) - 0.5, colors="k", linestyles="dashed")
plt.scatter(range(len(pulls)), pulls, c="k")
plt.errorbar(
range(len(pulls)), pulls, c="k", xerr=0, yerr=pullerr, marker=".", fmt="none"
)
plt.xticks(range(len(pulls)), labels, rotation=90)
plt.gcf().set_size_inches(25, 5)
plt.xlim(-0.5, len(pulls) - 0.5)
plt.ylabel(r"$(\theta - \hat{\theta})\,/ \Delta \theta$", fontsize=18);
plt.gcf().subplots_adjust(bottom=0.5)
plt.draw()
Thank you very much.
Best,
Shreya