0

I have this code for scatterplot:

for row_output in results:
    for current_result in row_output:
        mat = np.stack([current_result.x, current_result.y]).T
        colors = current_result.rgb_values
        size = [100] * colors.shape[0]
        ax.scatter(x=mat[:, 0],
                   y=mat[:, 1],
                   c=colors,
                   s=size,
                   alpha=opacity)
        
        ax.set_aspect('equal')

but i am getting this uneven result: enter image description here

is there a way for me to use this set_aspect('equal') property, but make the plot in the same length?

(I saw that there is plt.axis('square') option, but i cound not figure how to use it in an existing ax)

Kenny Smith
  • 729
  • 3
  • 9
  • 23

0 Answers0