Sets the label of the light
 @param label [String] Desired label
 @raise [LabelTooLong] if label is greater than {MAX_LABEL_LENGTH}
 @return [Light] self
544115
def set_label(label)
      if label.bytes.length > MAX_LABEL_LENGTH
        raise LabelTooLong.new("Label length in bytes must be below or equal to #{MAX_LABEL_LENGTH}")
      end
      while self.label != label
        send_message!(Protocol::Device::SetLabel.new(label: label.encode('utf-8')), wait_for: Protocol::Device::StateLabel)
      end
      self
    end
466572
public ChartConfiguration<T> setLabelY(String label) {
		if (label != null) {
			axesInstance().yAxisInstance().setLabel(label);
		}
		return this;
	}
1163719
def valueByLabel(self, label):
        
        keys = self.keys()
        labels = [text.pretty(key) for key in keys]
        if label in labels:
            return self[keys[labels.index(label)]]
        return 0
1185620
public function label($label)
    {
        if ($label === false) {
            $this->parts['{label}'] = '';
        } else {
            $this->parts['{label}'] = $label;
        }
        
        return $this;
    }
1330019
def label_for(k, label: nil)
      tag(:label, for: k.to_s.dasherize){ label || k.to_s.titleize } unless label == false
    end
1014978
def create(label)
      create_atomic(label.to_s) or create_composite(label.to_s) or raise MeasurementError.new("Unit '#{label}' not found")
    end
1369001
def _label(self, line):
        '''

        '''
        label = self._setup('LABEL', line)
        self.labels += [ label ]
1229008
def update_label(self, name, color, new_name=''):
        
        label = self.label(name)
        resp = False
        if label:
            upd = label.update
            resp = upd(new_name, color) if new_name else upd(name, color)
        return resp
765336
def __set_labels(self, labels):
        
        with self.fs.open(self.fs.join(self.path, self.LABEL_FILE), 'w') \
                as file_desc:
            for label in labels:
                file_desc.write("%s,%s\n" % (label.name,
                                             label.get_color_str()))
1016394
public void setLabel(final String label) {
        if (label != null)
            attrMixin.setAttribute(LABEL, label);
        else
            attrMixin.removeAttribute(LABEL);
    }
1281416
public function setLabel(LabelElement $label)
    {

        $this->label = $label;

        if(($for = $this->getAttribute('id'))) {
            $label->setAttribute('for', $for);
        }

        return $this;

    }
1086879
public Axis setAxisLabel(String label) {
        if (label == null) {
            if (index == 0) {
                label = "X";
            } else if (index == 1) {
                label = "Y";
            } else if (index == 2) {
                label = "Z";
            }
        }

        if (label != null) {
            double[] position = new double[base.getDimension()];

            if (base.getDimension() == 2) {
                position[index] = 0.5;
                if (index == 0) {
                    position[1] = -0.1;
                    axisLabel = new BaseLabel(label, 0.5, 1.0, position);
                } else {
                    position[0] = -0.15;
                    axisLabel = new BaseLabel(label, 0.5, 0.5, -Math.PI / 2, position);
                }
            } else {
                if (index == 0) {
                    position[2] = 1.0;
                    position[index] = 0.5;
                    axisLabel = new BaseLabel(label, 0.5, -2.0, position);
                } else if (index == 1) {
                    position[0] = 1.0;
                    position[index] = 0.5;
                    axisLabel = new BaseLabel(label, 0.5, 3.0, position);
                } else if (index == 2) {
                    position[1] = 1.0;
                    position[index] = 1.0;
                    axisLabel = new BaseLabel(label, -0.5, -1.0, position);
                }
            }

            axisLabel.setFont(axisLabelFont);
        }
        return this;
    }
1171315
def define(self, value, lineno, namespace=None):
        
        if self.defined:
            error(lineno, "label '%s' already defined at line %i" % (self.name, self.lineno))

        self.value = value
        self.lineno = lineno
        self.namespace = NAMESPACE if namespace is None else namespace
1289732
def setLabel(self, text=None, units=None, unitPrefix=None, **args):
        
        show_label = False
        if text is not None:
            self.labelText = text
            show_label = True
        if units is not None:
            self.labelUnits = units
            show_label = True
        if show_label:
            self.showLabel()
        if unitPrefix is not None:
            self.labelUnitPrefix = unitPrefix
        if len(args) > 0:
            self.labelStyle = args
        self.label.setHtml(self.labelString())
        self._adjustSize()
        self.picture = None
        self.update()
977283
def resp_set_label(self, resp, label=None):
        
        if label:
            self.label=label
        elif resp:
            self.label=resp.label.decode().replace("\x00", "")
269862
def label_width
      if !@label_width then
        @label_width = @samples.find_all{ |s| Sample === s }.
                          max{ |a, b| a.label.length <=> b.label.length }.
                          label.length + 1

        @label_width = 40 if @label_width < 40
      end

      return @label_width
    end
916654
public function setLabel($label)
    {
        parent::setLabel($label);
        if (isset($this->token['captcha'])) {
            if ((strpos($this->token['captcha'], '<img') === false) &&
                ((strpos($this->token['captcha'], ' + ') !== false) ||
                 (strpos($this->token['captcha'], ' - ') !== false) ||
                 (strpos($this->token['captcha'], ' * ') !== false) ||
                 (strpos($this->token['captcha'], ' / ') !== false))) {
                $this->label = $this->label . '(' .
                    str_replace([' * ', ' / '], [' &#215; ', ' &#247; '], $this->token['captcha'] .')');
            } else {
                $this->label = $this->label . $this->token['captcha'];
            }
        }
        return $this;
    }