def get_tree_dims(self):
        """
        get height and width if not set by user
        """
        if self.ncols * self.nrows < 4:
            minx = 250
            miny = 250
        else:
            minx = 200
            miny = 140

        # wider than tall
        if self.layout in ("d", "u"):
            self.width = (
                self.width if self.width
                else min(750, minx * self.ncols)
            )
            self.height = (
                self.height if self.height
                else min(750, miny * self.nrows)
            )

        else:
            self.height = (
                self.height if self.height 
                else min(750, minx * self.nrows)
            )
            self.width = (
                self.width if self.width
                else min(750, miny * self.ncols)
            )