I want to make the ticks on the right and upper axis invisible and am not sure what the third line should be:
import matplotlib.pyplot as plt plt.plot(X,Y) #
tick_params should do it.
tick_params
I don't have matplotlib installed on my current computer, so I can't test it, but this should work:
import matplotlib.pyplot as plt ax = plt.subplot(111) plt.plot([0,1], [0,1]) ax.tick_params(labeltop='off', labelright='off') plt.show()