python - Plotly, same scale for x and y axis -


i using plotly python , can't set x , y axis have same scale:

here layout:

layout = layout(     xaxis=xaxis(         range=[-150, 150],         showgrid=true,         zeroline=true,         showline=true,         gridcolor='#bdbdbd',         gridwidth=2,         zerolinecolor='#969696',         zerolinewidth=4,         linecolor='#636363',         linewidth=6     ),     yaxis=yaxis(         range=[-150,150],         showgrid=true,         zeroline=true,         showline=true,         gridcolor='#bdbdbd',         gridwidth=2,         zerolinecolor='#969696',         zerolinewidth=4,         linecolor='#636363',         linewidth=6     ) ) 

and this!

enter image description here

why scale different x , y? affect visualization.

how can grid square cells?

you can assign same length height , width in layout. here example:

layout = layout(     xaxis=xaxis(        range=[-150, 150],        showgrid=true,        zeroline=true,        showline=true,        gridcolor='#bdbdbd',        gridwidth=2,        zerolinecolor='#969696',        zerolinewidth=4,        linecolor='#636363',        linewidth=6     ),     yaxis=yaxis(         range=[-150,150],         showgrid=true,         zeroline=true,         showline=true,         gridcolor='#bdbdbd',         gridwidth=2,         zerolinecolor='#969696',         zerolinewidth=4,         linecolor='#636363',         linewidth=6    ),    height=600,    width=600, ) 

Comments

Popular posts from this blog

c# - Where does the .ToList() go in LINQ query result -

Listeners to visualise results of load test in JMeter -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -