class_docstr: Draw a centered box of a given width at the given position with
  the specified aspect ratio (if any).
class_docstr_tok: ["Draw","a","centered","box","of","a","given","width","at","the","given","position","with","the","specified","aspect","ratio","(","if","any",")","."]
code: def __init__(self, x, y, spec, **params):
      if isinstance(spec, tuple):
          if "aspect" in params:
              raise ValueError(
                  "Aspect parameter not supported when supplying "
                  "(width, height) specification."
              )
          (width, height) = spec
      else:
          width, height = params.get("width", spec), spec
  
      params["width"] = params.get("width", width)
      super().__init__(x=x, y=y, height=height, **params)
  
      half_width = (self.width * self.aspect) / 2.0
      half_height = self.height / 2.0
      (l, b, r, t) = (
          -half_width,
          -half_height,
          half_width,
          half_height,
      )
      box = np.array([(l, b), (l, t), (r, t), (r, b), (l, b)])
      rot = np.array(
          [
              [np.cos(self.orientation), -np.sin(self.orientation)],
              [np.sin(self.orientation), np.cos(self.orientation)],
          ]
      )
  
      xs, ys = np.tensordot(rot, box.T, axes=[1, 0])
      self.data = [np.column_stack([xs + x, ys + y])]
  
imports: import numpy
  import param
  from ..core import Dataset
  from ..core.data import MultiInterface
  from ..core.dimension import Dimension
  from .geom import Geometry
  from .selection import SelectionPolyExpr
label_desc: Use image node_id 1 to create a new Box object from inherited base classes: BaseShape with example: obj = Box(x, y, spec)