
# If you’re scattering comparable variables, you might get a misleading picture 
# if you let matplotlib choose the scale

# Example:

# Data: (very close to each other)
test_1_grades = [ 99, 90, 85, 97, 80]
test_2_grades = [100, 85, 60, 90, 70]

from matplotlib import pyplot as plt


# Scatter plot these
plt.scatter(test_1_grades, test_2_grades)

# It looks like variations in BOTH tests are similar....
# However, the SCALE for test 1 is VERY NARROW (75-100)
# but the SCALE for test 2 is TWICE as WIDE (50-100)

# If we include a call to plt.axis("equal"), the plot will more accurately show
# that most of the variation occurs on test 2.

plt.axis("equal")

# You can also manually change the scales:

#xticks = [x for x in range(60, 120, 10)]
#yticks = [y for y in range(60, 120, 10)]
#plt.xticks(xticks)
#plt.yticks(yticks)

plt.title("Axes Aren't Comparable")
plt.xlabel("test 1 grade")
plt.ylabel("test 2 grade")

plt.show() 
