The problem I have so far is that I have two plots in which, even though I specify the ticks ranges, as well as tried specifying the margins, I am still not able to get both plots to be. The problem seems to be the margins are not the same, however, when trying to fix by setting a common y margin, the result is not as the expected (second pic), it seems to ignore the tick frequency that I set. My goal is just to get both plots on the same format as I am putting them side-by-side
Here is my code:
plt.figure()
plt.scatter(x = x1, y = y1, marker = '.', s = 1.2, alpha = 0.75, label = 'DATA', color = 'darkorange')
plt.yticks(np.arange(0,1.2,0.2))
plt.xticks(np.arange(0,420,60))
lgnd = plt.legend(loc=1, scatterpoints=1, fontsize=10)
lgnd.legendHandles[0]._sizes = [30]
# plt.margins(y = 0.02)
plt.show()
plt.figure()
plt.scatter(x = x2, y = y2, marker = '.', s = 1.2, alpha = 0.75, label = 'DATA')
plt.xticks(np.arange(0,420,60))
plt.yticks(np.arange(0,1.2,0.2))
lgnd = plt.legend(loc=1, scatterpoints=1, fontsize=10)
lgnd.legendHandles[0]._sizes = [30]
# plt.margins(y = 0.02)
plt.show()





