I'd like to draw an equilateral triangle in python by hard coding, I don't want to use specific features. The code I wrote is as follows:
#Geometry of the system
#drawing triangles
#Triangle ABC
#A
#B
#C
# x axis values
a = [1, 41, 81, 1]
# y axis values
b = [1, 70, 1, 1]
#to fix the aspect ratio:
#ax = plt.gca()
#ax.set_aspect(1)
plt.plot(a,b,'-g')
plt.xlabel("$y/\u0394x$", fontsize=12)
plt.ylabel("$z/\u0394x$", fontsize=12)
plt.ylim(0,85)
plt.xlim(0,85)
plt.xticks(size = 12)
plt.yticks(size = 12)
plt.axis('scaled')
#ax.set_aspect('equal')
#plt.figure(figsize=(10,10))
# function to show the plot
plt.show()
Now, I believe that my calculation and the correct coordination of each corner of the triangle are accurate. However, when I get the figure, the triangle does not look equilateral. Could you please help me to solve this problem? Do I need to fix the aspect ratio and how can I fix the aspect ratio?
Also, the figure is attached for your reference. enter image description here
Thank you!