def plot(self, bgimage=None):
import pylab as pl
self._plot_background(bgimage)
ax = pl.gca()
y0, y1 = pl.ylim()
# r is the width of the thick line we use to show the facade colors
r = 5
patch = pl.Rectangle((self.facade_left + r, self.sky_line + r),
self.width - 2 * r,
self.door_line - self.sky_line - 2 * r,
color=self.color, fill=False, lw=2 * r)
ax.add_patch(patch)
pl.text((self.facade_right + self.facade_left) / 2.,
(self.door_line + self.sky_line) / 2.,
'$\sigma^2={:0.2f}$'.format(self.uncertainty_for_windows()))
patch = pl.Rectangle((self.facade_left + r, self.door_line + r),
self.width - 2 * r,
y0 - self.door_line - 2 * r,
color=self.mezzanine_color, fill=False, lw=2 * r)
ax.add_patch(patch)
# Plot the left and right edges in yellow
pl.vlines([self.facade_left, self.facade_right], self.sky_line, y0, colors='yellow')
# Plot the door line and the roof line
pl.hlines([self.door_line, self.sky_line], self.facade_left, self.facade_right, linestyles='dashed',
colors='yellow')
self.window_grid.plot()
评论列表
文章目录