October 2017
Intermediate to advanced
532 pages
16h 10m
English
One of the crucial ideas to grasp with the object-oriented approach is that each plotting element has both getter and setter methods. The getter methods all begin with get_ and either retrieve a specific property or retrieve other plotting objects. For instance, ax.get_yscale() retrieves the type of scale that the y axis is plotted with as a string (default is linear), while ax.get_xticklabels() retrieves a list of matplotlib text objects that each have their own getter and setter methods. Setter methods modify a specific property or an entire group of objects. A lot of matplotlib boils down to latching onto a specific plotting element and then examining and modifying it via the getter and setter methods.
Read now
Unlock full access