August 2017
Beginner to intermediate
334 pages
8h 22m
English
Instead of drawing an extra legend with pyplot.legend(), we can add textboxes using text() to directly label the curves. Up next is a figure generated by replacing pyplot.legend() with the following two lines of code. Text styling introduced in Chapter 2, Figure Aesthetics applies here:
ax.text(9, 9.6, "Supply", ha="center", va="center", size=16, rotation=33,color='C0')ax.text(9, 1.5, "Demand", ha="center", va="center", size=16, rotation=-33,color='C1')

Read now
Unlock full access