108 | def create_axes(title, figsize=(16, 6)): |
109 | fig = plt.figure(figsize=figsize) |
110 | fig.suptitle(title) |
111 | |
112 | |
113 | left, width = 0.1, 0.22 |
114 | bottom, height = 0.1, 0.7 |
115 | bottom_h = height + 0.15 |
116 | left_h = left + width + 0.02 |
117 | |
118 | rect_scatter = [left, bottom, width, height] |
119 | rect_histx = [left, bottom_h, width, 0.1] |
120 | rect_histy = [left_h, bottom, 0.05, height] |
121 | |
122 | ax_scatter = plt.axes(rect_scatter) |
123 | ax_histx = plt.axes(rect_histx) |
124 | ax_histy = plt.axes(rect_histy) |
125 | |
126 | |
127 | left = width + left + 0.2 |
128 | left_h = left + width + 0.02 |
129 | |
130 | rect_scatter = [left, bottom, width, height] |
131 | rect_histx = [left, bottom_h, width, 0.1] |
132 | rect_histy = [left_h, bottom, 0.05, height] |
133 | |
134 | ax_scatter_zoom = plt.axes(rect_scatter) |
135 | ax_histx_zoom = plt.axes(rect_histx) |
136 | ax_histy_zoom = plt.axes(rect_histy) |
137 | |
138 | |
139 | left, width = width + left + 0.13, 0.01 |
140 | |
141 | rect_colorbar = [left, bottom, width, height] |
142 | ax_colorbar = plt.axes(rect_colorbar) |
143 | |
144 | return ((ax_scatter, ax_histy, ax_histx), |
145 | (ax_scatter_zoom, ax_histy_zoom, ax_histx_zoom), |
146 | ax_colorbar) |