The problem is that the horizontal legend overlaps the x-axis title. It occurs if the legend is positioned below (rather than to the right of) the plot area using layout = {legend: {"orientation": "h"}};. It aggravates in combination with multiline x-axis titles (using <br> tags).
Currently there's no way to control the spacing between the legend and the plotting area. Everything is auto-scaled, it is useless to set the bottom margin (layout = {margin: {"b": ...}};) in this case because it refers to the space below the legend. The only way to make the whole x-axis title visible is to increase the height of the whole plot until the autoscaling sufficiently spreads the legend and the plotting area apart.
I try to illustrate the problem with the following 3 images which differ only in frame height:
height 700px:

height 1000px:

height 1300px:

Here is the above plot hosted on plot.ly.
The problem is that the horizontal legend overlaps the x-axis title. It occurs if the legend is positioned below (rather than to the right of) the plot area using
layout = {legend: {"orientation": "h"}};. It aggravates in combination with multiline x-axis titles (using<br>tags).Currently there's no way to control the spacing between the legend and the plotting area. Everything is auto-scaled, it is useless to set the bottom margin (
layout = {margin: {"b": ...}};) in this case because it refers to the space below the legend. The only way to make the whole x-axis title visible is to increase the height of the whole plot until the autoscaling sufficiently spreads the legend and the plotting area apart.I try to illustrate the problem with the following 3 images which differ only in frame height:
height 700px:

height 1000px:

height 1300px:

Here is the above plot hosted on plot.ly.