In PlotlyJS
, the relevant attributes (see Single-page reference in Julia) for fixing the aspect ratio are scaleanchor
, scaleratio
and (not allowed simultaneously with these) matches
:
p = Plot([heatmap(x=x, y=y, z=f, colorscale=colors.plasma,colorbar_thickness=24),
scatter(x=0.5*cos.(t), y=0.5*sin.(t), mode="lines",
line_width=2, line_color="black")],
Layout(width=600, height=320, yaxis_scaleanchor="x", yaxis_scaleratio=1,
xaxis_range=[-2,2], yaxis_range=[-1,1]))