I have a six-axes matplotlib figure, and i would like to draw a simple horizontal red line for x=2 over the whole figure. Is that possible ?
I saw this : Matplotlib: Can a plot a line from one set of axes to another? which is promising, but a bit complex - is there another simpler way ?
fig , axes = plt.subplots(1,6)
iteration = -1
for label, group in X.groupby(["quantile_Y"])["FTE"]:
iteration +=1
to_draw = axes[iteration]
local_title = "Y < "+label[label.find(",")+2:-5]
group.plot(kind = "box" ,
ax = to_draw ,
ylim = (0,5) ,
title = local_title )
to_draw.label_outer()
to_draw.set_axis_bgcolor("white")
to_draw.plot([0,0], [10,10])
plt.show()`
Which gives me :
It is clear that a straight line at x=2 could be useful ;)