October 2018
Beginner to intermediate
676 pages
18h 30m
English
In this example, we have used predefined "round" boxstyle. There are many predefined options, such as "circle", "darrow", "larrow", "rarrow", "square", "sawtooth" , and "roundtooth".
We can also custom develop these boxstyles as shown as follows:
import matplotlib.pyplot as pltfrom matplotlib.path import Path
def tbox_custom_style(x0, y0, width, height, size, mutation_aspect=1): pad = 0.5 * size x0, y0 = x0 - pad, y0 - pad width, height = width + 2 * pad, height + 2 * pad x1, y1 = x0 + width, y0 + height # Define the points along with first curve to be drawn verts = [(x0, y0), (x1, y0),(x1 + 2*pad, y0 + 2*pad),(x1, y1), (x0, y1), (x0, y0)]
Read now
Unlock full access