1# Basic syntax:
2plt.xlabel("X axis label") # Add ", fontsize = #" to control fontsize
3plt.ylabel("Y axis label")
4
5# Example usage:
6plt.plot(range(5))
7plt.xlabel("X axis label")
8plt.ylabel("Y axis label")
9plt.title("Figure title", fontsize = 20)
10
11# Note, xlabel and ylabel come from matplotlib.pyplot and plt is an
12# abbreviation for this, e.g. import matplotlib.pyplot as plt
1fig = plt.figure()
2ax = fig.add_subplot(...)
3
4ax.set_title('Title Here')
5
6ax.set_xlabel('x label here')
7ax.set_ylabel('y label here')
8ax.set_zlabel('z label here')
1ticks = [0, 1, 2]
2labels = ["a", "b", "c"]
3
4plt.figure()
5plt.xticks(ticks, labels)
6plt.show()