update xy limits of a plot, as used with .update_line()
7974
def set_viewlimits(self, panel='top'):
        
        this_panel = self.get_panel(panel)

        xmin, xmax, ymin, ymax = this_panel.conf.set_viewlimits()[0]
        # print("Set ViewLimits ", xmin, xmax, ymin, ymax)
        # make top/bottom panel follow xlimits
        if this_panel == self.panel:
            other = self.panel_bot
            for _ax in other.fig.get_axes():
                _ax.set_xlim((xmin, xmax), emit=True)
            other.draw()
1165247
def _update_Prxy(self):
        """"""
        self.Prxy = self.Frxy * self.Qxy
        _fill_diagonals(self.Prxy, self._diag_indices)
2289
def updateFft(self, *args, **kwargs):
        
        p = kwargs.pop('plot')
        if p == 'response': 
            self.responseFftPlot.updateData(*args, **kwargs)
        else:
            self.stimFftPlot.updateData(*args, **kwargs)
1018007
def dynamic_update(plot, subplot, key, overlay, items):
    
    match_spec = get_overlay_spec(overlay,
                                  wrap_tuple(key),
                                  subplot.current_frame)
    specs = [(i, get_overlay_spec(overlay, wrap_tuple(k), el))
             for i, (k, el) in enumerate(items)]
    closest = closest_match(match_spec, specs)
    if closest is None:
        return closest, None, False
    matched = specs[closest][1]
    return closest, matched, match_spec == matched
1335500
def set_ylim_cb(self, redraw=True):
        """"""
        try:
            ymin = float(self.w.y_lo.get_text())
        except Exception:
            set_min = True
        else:
            set_min = False

        try:
            ymax = float(self.w.y_hi.get_text())
        except Exception:
            set_max = True
        else:
            set_max = False

        if set_min or set_max:
            self.tab_plot.draw()
            self.set_ylimits_widgets(set_min=set_min, set_max=set_max)

        if not (set_min and set_max):
            self.tab_plot.ax.set_ylim(ymin, ymax)
            if redraw:
                self.tab_plot.draw()
704779
def _change_line(self, delta):
        
        # Ensure new line is within limits
        self._line = min(max(0, self._line + delta), len(self._value) - 1)

        # Fix up column if the new line is shorter than before.
        if self._column >= len(self._value[self._line]):
            self._column = len(self._value[self._line])
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;
}
1013022
def impose_legend_limit(limit=30, axes="gca", **kwargs):
    
    if axes=="gca": axes = _pylab.gca()

    # make these axes current
    _pylab.axes(axes)

    # loop over all the lines_pylab.
    for n in range(0,len(axes.lines)):
        if n >  limit-1 and not n==len(axes.lines)-1: axes.lines[n].set_label("_nolegend_")
        if n == limit-1 and not n==len(axes.lines)-1: axes.lines[n].set_label("...")

    _pylab.legend(**kwargs)
765081
def set_xylims(self, limits, axes=None):
        
        if self.panel is not None:
            self.panel.set_xylims(limits, axes=axes)
237698
def _update_plot(self, key, element, bars, lims, ranges):
        
        main = self.adjoined.main
        _, y1 = element.range(1)
        offset = self.offset * y1
        range_item, main_range, dim = get_sideplot_ranges(self, element, main, ranges)

        # Check if plot is colormapped
        plot_type = Store.registry['matplotlib'].get(type(range_item))
        if isinstance(plot_type, PlotSelector):
            plot_type = plot_type.get_plot_class(range_item)
        opts = self.lookup_options(range_item, 'plot')
        if plot_type and issubclass(plot_type, ColorbarPlot):
            cidx = opts.options.get('color_index', None)
            if cidx is None:
                opts = self.lookup_options(range_item, 'style')
                cidx = opts.kwargs.get('color', None)
                if cidx not in range_item:
                    cidx = None
            cdim = None if cidx is None else range_item.get_dimension(cidx)
        else:
            cdim = None

        # Get colormapping options
        if isinstance(range_item, (HeatMap, Raster)) or cdim:
            style = self.lookup_options(range_item, 'style')[self.cyclic_index]
            cmap = cm.get_cmap(style.get('cmap'))
            main_range = style.get('clims', main_range)
        else:
            cmap = None

        if offset and ('offset_line' not in self.handles):
            self.handles['offset_line'] = self.offset_linefn(offset,
                                                             linewidth=1.0,
                                                             color='k')
        elif offset:
            self._update_separator(offset)

        if cmap is not None:
            self._colorize_bars(cmap, bars, element, main_range, dim)
        return bars
1029450
def fix_ticks(ax):
    
    plt.setp(ax.get_yticklabels(), ha='center', x=0.5,
             transform=ax._yaxis_transform)

    # We'll still wind up with some tick labels beyond axes limits for reasons
    # I don't fully understand...
    limits = ax.get_ylim()
    for label, loc in zip(ax.yaxis.get_ticklabels(), ax.yaxis.get_ticklocs()):
        if loc < min(limits) or loc > max(limits):
            label.set(visible=False)
        else:
            label.set(visible=True)
208749
def update(self):
        """"""
        con = self.subpars.pars.control
        self(con.ypoints.shape[0])
865447
def xlim_changed(self, axsubplot):
        ''''''
        xrange = axsubplot.get_xbound()
        xlim = axsubplot.get_xlim()
        self.setup_xrange(xrange[1] - xrange[0])
        if self.draw_events == 0:
            # ignore limit change before first draw event
            return
        if self.xlim_pipe is not None and axsubplot == self.ax1 and xlim != self.xlim:
            self.xlim = xlim
            #print('send', self.graph_num, xlim)
            self.xlim_pipe[1].send(xlim)
5636
def set_xlimits_widgets(self, set_min=True, set_max=True):
        """"""
        xmin, xmax = self.tab_plot.ax.get_xlim()
        if set_min:
            self.w.x_lo.set_text('{0}'.format(xmin))
        if set_max:
            self.w.x_hi.set_text('{0}'.format(xmax))
323288
def update_bounds(self, bounds):
        ''''''
        self.bounds = np.array(bounds, dtype='float32')
        vertices, directions = self._gen_bounds(self.bounds) 
        
        self._verts_vbo.set_data(vertices)
        self._directions_vbo.set_data(directions)
        self.widget.update()
963286
def _update_artists(self, key, hist, edges, hvals, widths, lims, ranges):
        
        plot_vals = zip(self.handles['artist'], edges, hvals, widths)
        for bar, edge, height, width in plot_vals:
            if self.invert_axes:
                bar.set_y(edge)
                bar.set_width(height)
                bar.set_height(width)
            else:
                bar.set_x(edge)
                bar.set_height(height)
                bar.set_width(width)
921779
def update_line(self, t, x, y, **kw):
        
        self.panel.update_line(t, x, y, **kw)