Deselecting a line from legend

From the Line Plot Modes example in https://plot.ly/python/line-charts/, If I click “markers” in legend the markers line disappears and the axes get resized.

Is there any way to make the line for markers get dehighlight on click but not removed?