Updates the spike trace

        :param xdata: index values
        :type xdata: numpy.ndarray
        :param ydata: values to plot
        :type ydata: numpy.ndarray
176085
def updateSpiketrace(self, xdata, ydata, plotname=None):
        
        if plotname is None:
            plotname = self.responsePlots.keys()[0]

        if len(ydata.shape) == 1:
            self.responsePlots[plotname].updateData(axeskey='response', x=xdata, y=ydata)
        else:
            self.responsePlots[plotname].addTraces(xdata, ydata)
63401
def update_data(self, data):
        
        oldn_dim = self.n_dim
        if data.dtype != np.float32:
            print("Warning: data was not float32. A 32-bit copy was made")
            self._data = np.float32(data)
        else:
            self._data = data
        self.n_vectors, self.n_dim = data.shape
        if self.n_dim != oldn_dim and oldn_dim != 0:
            raise Exception("The dimension of the new data does not match!")
        self.bmus = np.zeros(self.n_vectors * 2, dtype=np.intc)
888978
def on_change_plot_cursor(self,event):
        
        if not self.xdata or not self.ydata: return
        pos=event.GetPosition()
        width, height = self.canvas.get_width_height()
        pos[1] = height - pos[1]
        xpick_data,ypick_data = pos
        xdata_org = self.xdata
        ydata_org = self.ydata
        data_corrected = self.map.transData.transform(vstack([xdata_org,ydata_org]).T)
        xdata,ydata = data_corrected.T
        xdata = list(map(float,xdata))
        ydata = list(map(float,ydata))
        e = 4e0

        if self.plot_setting == "Zoom":
            self.canvas.SetCursor(wx.Cursor(wx.CURSOR_CROSS))
        else:
            self.canvas.SetCursor(wx.Cursor(wx.CURSOR_ARROW))
        for i,(x,y) in enumerate(zip(xdata,ydata)):
            if 0 < sqrt((x-xpick_data)**2. + (y-ypick_data)**2.) < e:
                self.canvas.SetCursor(wx.Cursor(wx.CURSOR_HAND))
                break
        event.Skip()
1165247
def _update_Prxy(self):
        """"""
        self.Prxy = self.Frxy * self.Qxy
        _fill_diagonals(self.Prxy, self._diag_indices)
392176
void addData(
      Shape shape, double xOffset, double yOffset, double width, String xValue, String yValue) {

    String label = getLabel(xValue, yValue);
    addData(shape, xOffset, yOffset, width, label);
  }
464447
def _updateTargetFromNode(self):
        
        logger.debug("showAxis: {}, {}".format(self.axisPosition, self.configValue))
        self.plotItem.showAxis(self.axisPosition, show=self.configValue)
59207
private void performUpdate(final Vec x, final double y, final double yHat)
    {
        for(IndexValue iv : x)
        {
            final int j = iv.getIndex();
            w.set(j, 
                    T(w.get(j)+2*learningRate*(y-yHat)*iv.getValue(), 
                    ((time-t[j])/K)*gravity*learningRate,
                    threshold));
            
            t[j] += ((time-t[j])/K)*K;
        }
    }
828261
def plot_spikes(spikes, view=False, filename=None, title=None):
    
    t_values = [t for t, I, v, u, f in spikes]
    v_values = [v for t, I, v, u, f in spikes]
    u_values = [u for t, I, v, u, f in spikes]
    I_values = [I for t, I, v, u, f in spikes]
    f_values = [f for t, I, v, u, f in spikes]

    fig = plt.figure()
    plt.subplot(4, 1, 1)
    plt.ylabel("Potential (mv)")
    plt.xlabel("Time (in ms)")
    plt.grid()
    plt.plot(t_values, v_values, "g-")

    if title is None:
        plt.title("Izhikevich's spiking neuron model")
    else:
        plt.title("Izhikevich's spiking neuron model ({0!s})".format(title))

    plt.subplot(4, 1, 2)
    plt.ylabel("Fired")
    plt.xlabel("Time (in ms)")
    plt.grid()
    plt.plot(t_values, f_values, "r-")

    plt.subplot(4, 1, 3)
    plt.ylabel("Recovery (u)")
    plt.xlabel("Time (in ms)")
    plt.grid()
    plt.plot(t_values, u_values, "r-")

    plt.subplot(4, 1, 4)
    plt.ylabel("Current (I)")
    plt.xlabel("Time (in ms)")
    plt.grid()
    plt.plot(t_values, I_values, "r-o")

    if filename is not None:
        plt.savefig(filename)

    if view:
        plt.show()
        plt.close()
        fig = None

    return fig
1244252
def addRasterPoints(self, xdata, repnum, plotname=None):
        
        if plotname is None:
            plotname = self.responsePlots.keys()[0]
        ydata = np.ones_like(xdata)*repnum
        self.responsePlots[plotname].appendData('raster', xdata, ydata)
862224
def data(self, data):
        
        self._assert_shape(data, self._x_indexes, self._y_indexes)
        data[data == -np.inf] = 0.0
        data[data == np.inf] = 0.0
        self._data = data
        self._min_value = np.nanmin(self.data)
        self._max_value = np.nanmax(self.data)
        self._data_x_indexes = list(range(data.shape[0]))
        self._data_y_indexes = list(range(data.shape[1]))
        self._dirty = False
1212146
def traceplot(trace: sample_types, labels: List[Union[str, Tuple[str, str]]] = None, ax: Any = None,
              x0: int = 0) -> Any:
    

    if labels is None:
        labels = list(trace.keys())

    if ax is None:
        _, ax = plt.subplots(len(labels), 1, squeeze=False)

    for index, label in enumerate(labels):
        data = [sample for sample in trace[label]]

        ax[index][0].set_title(label)
        ax[index][0].plot(__integer_xaxis(ax[index][0], x0, len(data)), data)

    __pause_for_crude_animation()

    return ax
1852
function UpdateChartData()
{
    while(Points > 10)
    {
        Points -= 1;

        myLineChart.removeData();
    }

    myLineChart.addData([Data["Temperature"]], Math.floor((Date.now() - StartTime) / 1000.0));
    myLineChart.update();
    Points+=1;
}
1297397
def Update(self, data):
        
        for hypo in self.Values():
            like = self.Likelihood(data, hypo)
            self.Mult(hypo, like)
        self.Normalize()
1031947
def _getPlotData(self):
        
        resultsByClass = self.resultsByClass

        try:
            if resultsByClass['Uncertain'] == 0:  # remove uncertain tag if present and = 0
                resultsByClass.pop('Uncertain', None)
        except KeyError:
            pass

        plotData = list(zip(*resultsByClass.items()))  # (labels, ydata)

        return plotData
1208872
private function fillYData($x, $z, $value, array $x_axis, array $z_axis, array &$ydata): void
    {
        $x = $this->findAxisEntry($x, $x_axis);
        $z = $this->findAxisEntry($z, $z_axis);

        if (!array_key_exists($z, $z_axis)) {
            foreach (array_keys($z_axis) as $key) {
                if ($value <= $key) {
                    $z = $key;
                    break;
                }
            }
        }

        // Add the value to the appropriate data point.
        $ydata[$z][$x] = ($ydata[$z][$x] ?? 0) + $value;
    }
57218
def setDragData(self, data, x=None, y=None):
        
        self._dragData[(x, y)] = data
537616
public XYSeries addSeries(
      String seriesName,
      List<?> xData,
      List<? extends Number> yData,
      List<? extends Number> errorBars) {

    DataType dataType = getDataType(xData);
    switch (dataType) {
      case Date:
        return addSeries(
            seriesName,
            Utils.getDoubleArrayFromDateList(xData),
            Utils.getDoubleArrayFromNumberList(yData),
            Utils.getDoubleArrayFromNumberList(errorBars),
            DataType.Date);

      default:
        return addSeries(
            seriesName,
            Utils.getDoubleArrayFromNumberList(xData),
            Utils.getDoubleArrayFromNumberList(yData),
            Utils.getDoubleArrayFromNumberList(errorBars),
            DataType.Number);
    }
  }