October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots two patches as separate plots in the same figure:
figure_manager = backend_agg.new_figure_manager(1, figsize=(12,6))fig = figure_manager.canvas.figure
axs1 = fig.add_subplot(121)axs1.add_patch(Ellipse((3, 1.0), 4, 1.0, hatch='/', facecolor='g')) # centre=(3, 1.0), width=4, height=1.0axs1.set_xlim((0, 6))axs1.set_ylim((0, 2.5))
axs2 = fig.add_subplot(122)axs2.add_patch(Polygon([[0, 0], [4, 1.1], [6, 2.5], [2, 1.4]], color='b', lw=5, fill=False, hatch='+*'))axs2.set_xlim((0, 6))axs2.set_ylim((0, 2.5)) ...
Read now
Unlock full access