You can pass a tuple of x-y legend positions and plotly will draw the legend at that location. For example:
using Plots
plotlyjs()
legendplot = plot(rand(10, 2), legend=(0.8, 0.9))
savefig(legendplot, "legendposition.png")
savefig(legendplot, "legendposition.html")
Producing the following:
