Exemplo n.º 1
0
 def title_box(self):
     "Returns the title bounding box"
     return BoundingBox(
         self.x_margin, self.figure_box.height -
         (self.y_margin + 1.0 if bool(self.image_title) else 0.0),
         self.figure_box.width - (self.x_margin * 2),
         1.0 if bool(self.image_title) else 0.0)
Exemplo n.º 2
0
 def figure_box(self):
     "Returns the overall bounding box"
     return BoundingBox(
         0.0,
         0.0,
         self.image_box.width + (self.margin.x * 2),
         self.title_box.top + self.margin.y,
     )
Exemplo n.º 3
0
 def title_box(self):
     "Returns the title bounding box"
     return BoundingBox(
         self.margin.x,
         self.image_box.top,
         self.image_box.width,
         1.0 if bool(self.title) else 0.0,
     )
Exemplo n.º 4
0
 def colorbar_box(self):
     "Returns the colorbar bounding box"
     return BoundingBox(
         self.margin.x,
         self.margin.y,
         self.image_size.x / DPI,
         0.5 if self.colorbar else 0.0,
     )
Exemplo n.º 5
0
 def image_box(self):
     "Returns the image bounding box"
     return BoundingBox(
         self.margin.x,
         self.histogram_box.top +
         (self.sep_margin if self.colorbar or self.histogram else 0.0),
         self.image_size.x / DPI,
         self.image_size.y / DPI,
     )
Exemplo n.º 6
0
 def histogram_box(self):
     "Returns the histogram bounding box"
     return BoundingBox(
         self.margin.x,
         self.colorbar_box.top +
         (self.sep_margin if self.colorbar else 0.0),
         self.image_size.x / DPI,
         self.image_size.y / DPI * 0.8 if self.histogram else 0.0,
     )
Exemplo n.º 7
0
 def histogram_box(self):
     "Returns the histogram bounding box"
     return BoundingBox(
         self.x_margin, self.colorbar_box.top +
         (self.sep_margin if self.colorbar_visible else 0.0),
         self.figure_box.width - (self.x_margin * 2),
         (self.figure_box.height - (self.y_margin * 2) -
          self.colorbar_box.height - self.title_box.height -
          (self.sep_margin if self.colorbar_visible else 0.0) -
          (self.sep_margin if bool(self.image_title) else 0.0)) /
         2.0 if self.histogram_visible else 0.0)
Exemplo n.º 8
0
 def colorbar_box(self):
     "Returns the colorbar bounding box"
     return BoundingBox(self.x_margin, self.y_margin,
                        self.figure_box.width - (self.x_margin * 2),
                        0.5 if self.colorbar_visible else 0.0)
Exemplo n.º 9
0
 def figure_box(self):
     "Returns the overall bounding box"
     return BoundingBox(0.0, 0.0, self.figure.get_figwidth(),
                        self.figure.get_figheight())