updates the logger and plot on the interpretation editor window
180620
def update_editor(self):
        

        self.fit_list = []
        self.search_choices = []
        for specimen in self.specimens_list:
            if specimen not in self.parent.pmag_results_data['specimens']: continue
            self.fit_list += [(fit,specimen) for fit in self.parent.pmag_results_data['specimens'][specimen]]

        self.logger.DeleteAllItems()
        offset = 0
        for i in range(len(self.fit_list)):
            i -= offset
            v = self.update_logger_entry(i)
            if v == "s": offset += 1
1358152
def _update(self, axes_list):
        
        plot_type = self.settings['plot_style']
        if plot_type == '2D':
            # we expect exactely one image in the axes object (see ScriptDummy.plot)
            implot = axes_list[1].get_images()[0]
            # now update the data
            implot.set_data(self.data['random data'])

            colorbar = implot.colorbar

            if not colorbar is None:
                colorbar.update_bruteforce(implot)

        else:
            # fall back to default behaviour
            Script._update(self, axes_list)
41897
def plot_loglogs(cls, loc=None, iloc=None, show_censors=False, censor_styles=None, **kwargs):
    

    def loglog(s):
        return np.log(-np.log(s))

    if (loc is not None) and (iloc is not None):
        raise ValueError("Cannot set both loc and iloc in call to .plot().")

    if censor_styles is None:
        censor_styles = {}

    set_kwargs_ax(kwargs)
    set_kwargs_color(kwargs)
    set_kwargs_drawstyle(kwargs)
    kwargs["logx"] = True

    dataframe_slicer = create_dataframe_slicer(iloc, loc)

    # plot censors
    ax = kwargs["ax"]
    colour = kwargs["c"]

    if show_censors and cls.event_table["censored"].sum() > 0:
        cs = {"marker": "+", "ms": 12, "mew": 1}
        cs.update(censor_styles)
        times = dataframe_slicer(cls.event_table.loc[(cls.event_table["censored"] > 0)]).index.values.astype(float)
        v = cls.predict(times)
        # don't log times, as Pandas will take care of all log-scaling later.
        ax.plot(times, loglog(v), linestyle="None", color=colour, **cs)

    # plot estimate
    dataframe_slicer(loglog(cls.survival_function_)).plot(**kwargs)
    ax.set_xlabel("log(timeline)")
    ax.set_ylabel("log(-log(survival_function_))")
    return ax
694164
def update_probes(self, progress):
        
        new_values = self.read_probes.probes_values
        probe_count = len(self.read_probes.probes)

        if probe_count > self.tree_probes.topLevelItemCount():
            # when run for the first time, there are no probes in the tree, so we have to fill it first
            self.fill_treewidget(self.tree_probes, new_values)
        else:
            for x in range(probe_count):
                topLvlItem = self.tree_probes.topLevelItem(x)
                for child_id in range(topLvlItem.childCount()):
                    child = topLvlItem.child(child_id)
                    child.value = new_values[topLvlItem.name][child.name]
                    child.setText(1, str(child.value))

        if self.probe_to_plot is not None:
            self.probe_to_plot.plot(self.matplotlibwidget_1.axes)
            self.matplotlibwidget_1.draw()


        if self.chk_probe_log.isChecked():
            data = ','.join(list(np.array([[str(p) for p in list(p_dict.values())] for instr, p_dict in new_values.items()]).flatten()))
            self.probe_file.write('{:s}\n'.format(data))
190955
def updateSignal(self, *args, **kwargs):
        
        p = kwargs.pop('plot')
        if p == 'response':
            self.responseSignalPlot.updateData(*args, **kwargs)
        else:
            self.stimSignalPlot.updateData(*args, **kwargs)
550730
def _update_plotting_params(self, **kwargs):
        
        scalars = kwargs.get('scalars', None)
        if scalars is not None:
            old = self.display_params['scalars']
            self.display_params['scalars'] = scalars
            if old != scalars:
                self.plotter.subplot(*self.loc)
                self.plotter.remove_actor(self._data_to_update, reset_camera=False)
                self._need_to_update = True
                self.valid_range = self.input_dataset.get_data_range(scalars)
                # self.display_params['rng'] = self.valid_range
        cmap = kwargs.get('cmap', None)
        if cmap is not None:
            self.display_params['cmap'] = cmap
1217841
private static void updateSniffingLoggersLevel(Logger logger) {

		InputStream settingIS = FoundationLogger.class
				.getResourceAsStream("/sniffingLogger.xml");
		if (settingIS == null) {
			logger.debug("file sniffingLogger.xml not found in classpath");
		} else {
			try {
				SAXBuilder builder = new SAXBuilder();
				Document document = builder.build(settingIS);
				settingIS.close();
				Element rootElement = document.getRootElement();
				List<Element> sniffingloggers = rootElement
						.getChildren("sniffingLogger");
				for (Element sniffinglogger : sniffingloggers) {
					String loggerName = sniffinglogger.getAttributeValue("id");
					Logger.getLogger(loggerName).setLevel(Level.TRACE);
				}
			} catch (Exception e) {
				logger.error(
						"cannot load the sniffing logger configuration file. error is: "
								+ e, e);
				throw new IllegalArgumentException(
						"Problem parsing sniffingLogger.xml", e);
			}
		}

	}
703705
def _update_callbacks(self, plot):
        
        subplots = self.traverse(lambda x: x, [GenericElementPlot])
        merged_tools = {t: list(plot.select({'type': TOOL_TYPES[t]}))
                        for t in self._merged_tools}
        for subplot in subplots:
            for cb in subplot.callbacks:
                for c in cb.callbacks:
                    for tool, objs in merged_tools.items():
                        if tool in c.args and objs:
                            c.args[tool] = objs[0]
                    if self.top_level:
                        c.code = c.code.replace('PLACEHOLDER_PLOT_ID', self.id)
509066
def __update_cursor_info(self):
        

        if not self.delegate:  # allow display to work without delegate
            return

        if self.__mouse_in and self.__last_mouse:
            pos_1d = None
            axes = self.__axes
            line_graph_canvas_item = self.line_graph_canvas_item
            if axes and axes.is_valid and line_graph_canvas_item:
                mouse = self.map_to_canvas_item(self.__last_mouse, line_graph_canvas_item)
                plot_rect = line_graph_canvas_item.canvas_bounds
                if plot_rect.contains_point(mouse):
                    mouse = mouse - plot_rect.origin
                    x = float(mouse.x) / plot_rect.width
                    px = axes.drawn_left_channel + x * (axes.drawn_right_channel - axes.drawn_left_channel)
                    pos_1d = px,
            self.delegate.cursor_changed(pos_1d)
1350765
def _update_versions():
    """"""
    for pm_name in plot._plot_methods:
        pm = getattr(plot, pm_name)
        plugin = pm._plugin
        if (plugin is not None and plugin not in _versions and
                pm.module in sys.modules):
            _versions.update(get_versions(key=lambda s: s == plugin))
1140494
def init_logs(args, tool="NanoPlot"):
    """"""
    start_time = dt.fromtimestamp(time()).strftime('%Y%m%d_%H%M')
    logname = os.path.join(args.outdir, args.prefix + tool + "_" + start_time + ".log")
    handlers = [logging.FileHandler(logname)]
    if args.verbose:
        handlers.append(logging.StreamHandler())
    logging.basicConfig(
        format='%(asctime)s %(message)s',
        handlers=handlers,
        level=logging.INFO)
    logging.info('{} {} started with arguments {}'.format(tool, __version__, args))
    logging.info('Python version is: {}'.format(sys.version.replace('\n', ' ')))
    return logname
510239
function() {
      var logreader = new tr.e.importer.v8.LogReader(
          { 'timer-event' : {
            parsers: [null, parseInt, parseInt],
            processor: this.processTimerEvent_.bind(this)
          },
          'shared-library': {
            parsers: [null, parseInt, parseInt],
            processor: this.processSharedLibrary_.bind(this)
          },
          'timer-event-start' : {
            parsers: [null, parseInt],
            processor: this.processTimerEventStart_.bind(this)
          },
          'timer-event-end' : {
            parsers: [null, parseInt],
            processor: this.processTimerEventEnd_.bind(this)
          },
          'code-creation': {
            parsers: [null, parseInt, parseInt, parseInt, null],
            processor: this.processCodeCreateEvent_.bind(this)
          },
          'code-move': {
            parsers: [parseInt, parseInt],
            processor: this.processCodeMoveEvent_.bind(this)
          },
          'code-delete': {
            parsers: [parseInt],
            processor: this.processCodeDeleteEvent_.bind(this)
          },
          'tick': {
            parsers: [parseInt, parseInt, null, null, parseInt, 'var-args'],
            processor: this.processTickEvent_.bind(this)
          },
          'distortion': {
            parsers: [parseInt],
            processor: this.processDistortion_.bind(this)
          },
          'plot-range': {
            parsers: [parseInt, parseInt],
            processor: this.processPlotRange_.bind(this)
          },
          'v8-version': {
            parsers: [parseInt, parseInt, parseInt, parseInt, parseInt],
            processor: this.processV8Version_.bind(this)
          }
          });

      this.v8_timer_thread_ =
          this.model_.getOrCreateProcess(-32).getOrCreateThread(1);
      this.v8_timer_thread_.name = 'V8 Timers';
      this.v8_thread_ =
          this.model_.getOrCreateProcess(-32).getOrCreateThread(2);
      this.v8_thread_.name = 'V8';

      var lines = this.logData_.split('\n');
      for (var i = 0; i < lines.length; i++) {
        logreader.processLogLine(lines[i]);
      }

      // The processing of samples adds all the root stack frame to
      // this.root_stack_frame_. But, we don't want that stack frame in the real
      // model. So get rid of it.
      this.root_stack_frame_.removeAllChildren();

      function addSlices(slices, thread) {
        for (var i = 0; i < slices.length; i++) {
          var duration = slices[i].end - slices[i].start;
          var slice = new tr.model.Slice('v8', slices[i].name,
              ColorScheme.getColorIdForGeneralPurposeString(slices[i].name),
              slices[i].start, {}, duration);
          thread.sliceGroup.pushSlice(slice);
          addSlices(slices[i].children, thread);
        }
      }
      addSlices(this.v8_stack_timeline_, this.v8_thread_);
    }
795971
private void updateWrapping() {
    this.editorPane.setWrapStyleWord(this.wrapping != Wrapping.CHAR_WRAP);
    this.editorPane.setLineWrap(this.wrapping != Wrapping.NONE);
    updateBottomPanel();
  }
729765
def update_screen(self):
        """"""
        self.clock.tick(self.FPS)
        pygame.display.update()
308694
def SetLogger(logger):
  """"""
  global log_info_message
  global log_warning_message
  global log_error_message
  log_info_message = logger.info
  log_warning_message = logger.warning
  log_error_message = logger.error
  logger.addFilter(LineNoFilter())
104294
private void updateProgress() {
        // Start panel data settings
    	HostProcess hp = getSelectedHostProcess();
        if (scan.getHostProcesses() != null && hp != null) {

            // Update the main table entries
            model.updateValues(scan, hp);

            if (scan.isStopped()) {
                this.stopThread = true;
            }
            
            if (chart != null) {
	            ResponseCountSnapshot snapshot = scan.getRequestHistory();
	            while (snapshot != null) {
	            	try {
	            		Second second = new Second(snapshot.getDate());
						this.seriesTotal.add(second, snapshot.getTotal());
						this.series100.add(second, snapshot.getResp100());
						this.series200.add(second, snapshot.getResp200());
						this.series300.add(second, snapshot.getResp300());
						this.series400.add(second, snapshot.getResp400());
						this.series500.add(second, snapshot.getResp500());
			            snapshot = scan.getRequestHistory();
			            
			            for (Plugin plugin : scan.getHostProcesses().get(0).getRunning()) {
			            	if (!labelsAdded.contains(plugin.getName())) {
			            		// Add a vertical line with the plugin name
				            	ValueMarker vm = new ValueMarker(plugin.getTimeStarted().getTime());
				            	
								double center = chart.getXYPlot().getRangeAxis().getRange().getCentralValue();
								if (lastCentre != center) {
									if (lastCentre != -1) {
										// Move the existing labels so they stay in the centre
										@SuppressWarnings("rawtypes")
										List annotations = chart.getXYPlot().getAnnotations();
										for (Object o: annotations) {
											if (o instanceof XYTextAnnotation) {
												XYTextAnnotation annotation = (XYTextAnnotation)o;
												annotation.setY(center);
											}
										}
									}
									lastCentre = center;
								}
				            	
				            	XYTextAnnotation updateLabel = 
				            			new XYTextAnnotation(plugin.getName(), 
				            					plugin.getTimeStarted().getTime(), center);
				            	updateLabel.setFont(FontUtils.getFont("Sans Serif"));
				            	updateLabel.setRotationAnchor(TextAnchor.BASELINE_CENTER);
				            	
				            	updateLabel.setTextAnchor(TextAnchor.BASELINE_CENTER);
				            	updateLabel.setRotationAngle(-3.14 / 2);
				            	updateLabel.setPaint(Color.black);
				            	chart.getXYPlot().addDomainMarker(vm, Layer.BACKGROUND);
				            	chart.getXYPlot().addAnnotation(updateLabel);
			            		labelsAdded.add(plugin.getName());
			            	}
			            }
					} catch (Exception e) {
						log.error(e.getMessage(), e);
						snapshot = null;
					}
	            }
            }
        }
    }
183537
def _entryChanged(self, entry):
        """"""
        # resave the log
        self.purrer.save()
        # redo entry item
        if entry.tw_item:
            number = entry.tw_item._ientry
            entry.tw_item = None
            self.etw.takeTopLevelItem(number)
            if number:
                after = self.etw.topLevelItem(number - 1)
            else:
                after = None
            self._addEntryItem(entry, number, after)
        # log will have changed, so update the viewer
        self._updateViewer()