Start measuring on an axis.
975621
def _onLeftButtonDown(self, evt):
        """"""
        x = evt.GetX()
        y = self.figure.bbox.height - evt.GetY()
        evt.Skip()
        self.CaptureMouse()
        FigureCanvasBase.button_press_event(self, x, y, 1, guiEvent=evt)
606989
def run(self):
        """"""
        self._initialize_run()

        stimuli = self.protocol_model.allTests()

        self.acq_thread = threading.Thread(target=self._worker, 
                                           args=(stimuli,), )
        # save the current calibration to data file doc        
        if self.save_data:
            info = {'calibration_used': self.calname, 'calibration_range': self.cal_frange}
            self.datafile.set_metadata(self.current_dataset_name, info)

        # save the start time and set last tick to expired, so first
        # acquisition loop iteration executes immediately
        self.start_time = time.time()
        self.last_tick = self.start_time - (self.interval/1000)

        self.acq_thread.start()
        return self.acq_thread
1327673
def ystep(self):
        
        """

        self.Y = np.asarray(sp.prox_l2(
            self.AX + self.U, (self.lmbda/self.rho)*self.Wtvna,
            axis=self.saxes), dtype=self.dtype)
903880
def ustep(self):
        """"""

        self.U += self.rsdl_r(self.AX, self.Y)
600571
def start(self):
        """"""
        assert not self.is_running(), 'Attempted to start an energy measurement while one was already running.'

        self._measurement_process = subprocess.Popen(
            [self._executable, '-r'],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            bufsize=10000,
            preexec_fn=os.setpgrp, # Prevent delivery of Ctrl+C to subprocess
            )
985947
def set_measurements(test):
  """"""
  test.measurements.level_none = 0
  time.sleep(1)
  test.measurements.level_some = 8
  time.sleep(1)
  test.measurements.level_all = 9
  time.sleep(1)
  level_all = test.get_measurement('level_all')
  assert level_all.value == 9
61328
def start(self, measurementId):
        
        self.sendURL = self.rootURL + measurementId + '/' + self.deviceName
        self.startResponseCode = self._doPut(self.sendURL)
874055
def prepare_venn_axes(ax, centers, radii):
    '''
    
    '''
    ax.set_aspect('equal')
    ax.set_xticks([])
    ax.set_yticks([])
    min_x = min([centers[i][0] - radii[i] for i in range(len(radii))])
    max_x = max([centers[i][0] + radii[i] for i in range(len(radii))])
    min_y = min([centers[i][1] - radii[i] for i in range(len(radii))])
    max_y = max([centers[i][1] + radii[i] for i in range(len(radii))])
    ax.set_xlim([min_x - 0.1, max_x + 0.1])
    ax.set_ylim([min_y - 0.1, max_y + 0.1])
    ax.set_axis_off()
454268
function buildAxis() {
            axis = d3Axis.axisBottom(xScale)
                .ticks(ticks)
                .tickPadding(tickPadding)
                .tickFormat(d3Format.format(numberFormat));
        }
77465
def append(self, measurement):
        
        assert isinstance(measurement, Measurement)
        assert measurement.station_id == self.station_id
        self.measurements.append(measurement)
427524
def check_offset(self):
        """"""

        for d in range(self.dmps):
            if (self.y0[d] == self.goal[d]):
                self.goal[d] += 1e-4
1138161
def project_onto(objs, axis, min_gap_size=4.0):
    
    if axis == "x":
        axis = 0
    if axis == "y":
        axis = 1
    axis_end = axis + 2
    if axis == 0:  # if projecting onto X axis
        objs.sort(key=lambda o: o.x0)
    else:
        objs.sort(key=lambda o: o.y0)

    intervals = []
    groups = []

    start_i = 0
    start = objs[0].bbox[axis]
    end = objs[0].bbox[axis_end]

    # Use _inf_bbox to trigger the last interval divide
    for o_i, o in enumerate(chain(objs, [_inf_bbox])):

        # Get current interval
        o_start = o.bbox[axis]
        o_end = o.bbox[axis_end]

        # start new interval when gap with previous end is big
        if o_start > end + min_gap_size:

            # Append new interval coordinates for children
            intervals.append((start, end))

            # Append child object group on page
            groups.append(objs[start_i:o_i])

            # Mark next obj list range
            start_i = o_i
            start = o_start

        # Always check to extend current interval to new end
        if o_end > end:
            end = o_end
        # else do nothing
    return intervals, groups
748799
def tickmark(self, x, y, size=10, orientation=90):
        """"""

        (x1, y1) = self.p2c([x, y])
        x2 = x1 + size * math.cos(math.radians(orientation))
        y2 = y1 - size * math.sin(math.radians(orientation))
        self.create_line(x1, y1, x2, y2)
1097376
void measure(Registry registry, JmxData data, List<Measurement> ms) {
    Map<String, String> tags = tagMappings.entrySet().stream().collect(Collectors.toMap(
        Map.Entry::getKey,
        e -> MappingExpr.substitute(e.getValue(), data.getStringAttrs())
    ));
    Id id = registry
        .createId(MappingExpr.substitute(nameMapping, data.getStringAttrs()))
        .withTags(tags);

    Map<String, Number> numberAttrs = new HashMap<>(data.getNumberAttrs());
    JmxData previous = previousData.put(data.getName(), data);
    if (previous != null) {
      previous.getNumberAttrs().forEach((key, value) -> numberAttrs.put("previous:" + key, value));
    }

    Double v = MappingExpr.eval(valueMapping, numberAttrs);

    if (v != null && !v.isNaN()) {
      if (counter) {
        updateCounter(registry, id, v.longValue());
      } else {
        ms.add(new Measurement(id, registry.clock().wallTime(), v));
      }
    }
  }
882247
def Y_less(self):
        """"""
        self.parent.value('y_scale', self.parent.value('y_scale') / 2)
        self.parent.traces.display()
1006802
function setAxis(axis, axisModel) {
    axis.type = axisModel.get('type');
    axis.scale = createScaleByModel(axisModel);
    axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';
    axis.inverse = axisModel.get('inverse');

    if (axisModel.mainType === 'angleAxis') {
        axis.inverse ^= axisModel.get('clockwise');
        var startAngle = axisModel.get('startAngle');
        axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360));
    }

    // Inject axis instance
    axisModel.axis = axis;
    axis.model = axisModel;
}
305462
def set_xticks(start, step, axes="gca"):
    
    if axes=="gca": axes = _pylab.gca()

    # first get one of the tick label locations
    yposition = axes.xaxis.get_ticklabels()[0].get_position()[1]

    # get the bounds
    xmin, xmax = axes.get_xlim()

    # get the starting tick
    nstart = int(_pylab.floor((xmin-start)/step))
    nstop  = int(_pylab.ceil((xmax-start)/step))
    ticks = []
    for n in range(nstart,nstop+1): ticks.append(start+n*step)

    axes.set_xticks(ticks)

    # set the y-position
    for t in axes.xaxis.get_ticklabels():
        x, y = t.get_position()
        t.set_position((x, yposition))

    _pylab.draw()