qcodes/plots/qcmatplotlib.py
def update_plot(self):
        """
        update the plot. The DataSets themselves have already been updated
        in update, here we just push the changes to the plot.
        """
        # matplotlib doesn't know how to autoscale to a pcolormesh after the
        # first draw (relim ignores it...) so we have to do this ourselves
        bboxes = dict(zip(self.subplots, [[] for p in self.subplots]))

        for trace in self.traces:
            config = trace['config']
            plot_object = trace['plot_object']
            if 'z' in config:
                # pcolormesh doesn't seem to allow editing x and y data, only z
                # so instead, we'll remove and re-add the data.
                if plot_object:
                    plot_object.remove()

                ax = self[config.get('subplot', 1) - 1]
                kwargs = deepcopy(config)
                # figsize may be passed in as part of config.
                # pcolormesh will raise an error if this is passed to it
                # so strip it here.
                if 'figsize' in kwargs:
                    kwargs.pop('figsize')
                plot_object = self._draw_pcolormesh(ax, **kwargs)
                trace['plot_object'] = plot_object

                if plot_object:
                    bboxes[plot_object.axes].append(
                        plot_object.get_datalim(plot_object.axes.transData))
            else:
                for axletter in 'xy':
                    setter = 'set_' + axletter + 'data'
                    if axletter in config:
                        getattr(plot_object, setter)(config[axletter])

        for ax in self.subplots:
            if ax.get_autoscale_on():
                ax.relim()
                if bboxes[ax]:
                    bbox = Bbox.union(bboxes[ax])
                    if np.all(np.isfinite(ax.dataLim)):
                        # should take care of the case of lines + heatmaps
                        # where there's already a finite dataLim from relim
                        ax.dataLim.set(Bbox.union(ax.dataLim, bbox))
                    else:
                        # when there's only a heatmap, relim gives inf bounds
                        # so just completely overwrite it
                        ax.dataLim = bbox
                ax.autoscale()

        self.fig.canvas.draw()

        update the plot. The DataSets themselves have already been updated
        in update, here we just push the changes to the plot.
        
update the plot. The DataSets themselves have already been updated
in update, here we just push the changes to the plot.
update the plot . The DataSets themselves have already been updated in update here we just push the changes to the plot .
def update_plot(self):
        bboxes = dict(zip(self.subplots, [[] for p in self.subplots]))
        for trace in self.traces:
            config = trace['config']
            plot_object = trace['plot_object']
            if 'z' in config:
                if plot_object:
                    plot_object.remove()
                ax = self[config.get('subplot', 1) - 1]
                kwargs = deepcopy(config)
                if 'figsize' in kwargs:
                    kwargs.pop('figsize')
                plot_object = self._draw_pcolormesh(ax, **kwargs)
                trace['plot_object'] = plot_object
                if plot_object:
                    bboxes[plot_object.axes].append(
                        plot_object.get_datalim(plot_object.axes.transData))
            else:
                for axletter in 'xy':
                    setter = 'set_' + axletter + 'data'
                    if axletter in config:
                        getattr(plot_object, setter)(config[axletter])
        for ax in self.subplots:
            if ax.get_autoscale_on():
                ax.relim()
                if bboxes[ax]:
                    bbox = Bbox.union(bboxes[ax])
                    if np.all(np.isfinite(ax.dataLim)):
                        ax.dataLim.set(Bbox.union(ax.dataLim, bbox))
                    else:
                        ax.dataLim = bbox
                ax.autoscale()
        self.fig.canvas.draw()
def update_plot ( self ) : bboxes = dict ( zip ( self . subplots , [ [ ] for p in self . subplots ] ) ) for trace in self . traces : config = trace [ 'config' ] plot_object = trace [ 'plot_object' ] if 'z' in config : if plot_object : plot_object . remove ( ) ax = self [ config . get ( 'subplot' , 1 ) - 1 ] kwargs = deepcopy ( config ) if 'figsize' in kwargs : kwargs . pop ( 'figsize' ) plot_object = self . _draw_pcolormesh ( ax , ** kwargs ) trace [ 'plot_object' ] = plot_object if plot_object : bboxes [ plot_object . axes ] . append ( plot_object . get_datalim ( plot_object . axes . transData ) ) else : for axletter in 'xy' : setter = 'set_' + axletter + 'data' if axletter in config : getattr ( plot_object , setter ) ( config [ axletter ] ) for ax in self . subplots : if ax . get_autoscale_on ( ) : ax . relim ( ) if bboxes [ ax ] : bbox = Bbox . union ( bboxes [ ax ] ) if np . all ( np . isfinite ( ax . dataLim ) ) : ax . dataLim . set ( Bbox . union ( ax . dataLim , bbox ) ) else : ax . dataLim = bbox ax . autoscale ( ) self . fig . canvas . draw ( )
update the plot.
update the plot .
"""
        update the plot. The DataSets themselves have already been updated
        in update, here we just push the changes to the plot.
        """ # matplotlib doesn't know how to autoscale to a pcolormesh after the # first draw (relim ignores it...) so we have to do this ourselves # pcolormesh doesn't seem to allow editing x and y data, only z # so instead, we'll remove and re-add the data. # figsize may be passed in as part of config. # pcolormesh will raise an error if this is passed to it # so strip it here. # should take care of the case of lines + heatmaps # where there's already a finite dataLim from relim # when there's only a heatmap, relim gives inf bounds # so just completely overwrite it
self