Draw the displayer by executing first the lookup call to retrieve the target data set
766844
@Override
    public void draw() {
        if (displayerSettings == null) {
            getView().errorMissingSettings();
        }
        else if (dataSetHandler == null) {
            getView().errorMissingHandler();
        }
        else if (!isDrawn()) {
            try {
                drawn = true;
                getView().showLoading();

                beforeLoad();
                beforeDataSetLookup();
                dataSetHandler.lookupDataSet(new DataSetReadyCallback() {
                    public void callback(DataSet result) {
                        try {
                            dataSet = result;
                            afterLoad();
                            afterDataSetLookup(result);
                            createVisualization();
                            getView().showVisualization();

                            // Set the id of the container panel so that the displayer can be easily located
                            // by testing tools for instance.
                            String id = getDisplayerId();
                            if (!StringUtils.isBlank(id)) {
                                getView().setId(id);
                            }
                            // Draw done
                            afterDraw();
                        } catch (Exception e) {
                            // Give feedback on any initialization error
                            showError(new ClientRuntimeError(e));
                        }
                    }
                    public void notFound() {
                        getView().errorDataSetNotFound(displayerSettings.getDataSetLookup().getDataSetUUID());
                    }

                    @Override
                    public boolean onError(final ClientRuntimeError error) {
                        showError(error);
                        return false;
                    }
                });
            } catch (Exception e) {
                showError(new ClientRuntimeError(e));
            }
        }
    }
186281
def _draw(self):
        
        self._window.draw(self._width, self._height, self.terminal)
530315
def draw(self):
        
        if not self.visible:
            return

        if self.isEnabled:
        
            # Draw the dragger's current appearance to the window.
            if self.dragging:
                self.window.blit(self.surfaceDown, self.rect)
            else:  # mouse is up
                if self.mouseOver:
                    self.window.blit(self.surfaceOver, self.rect)
                else:
                    self.window.blit(self.surfaceUp, self.rect)
        else:
            self.window.blit(self.surfaceDisabled, self.rect)
71494
def draw(self):
        
        # Number of colors is either number of classes or 2
        colors = resolve_colors(len(self.support_))

        if self._mode == BALANCE:
            self.ax.bar(
                np.arange(len(self.support_)), self.support_,
                color=colors, align='center', width=0.5
            )

        # Compare mode
        else:
            bar_width = 0.35
            labels = ["train", "test"]

            for idx, support in enumerate(self.support_):
                index = np.arange(len(self.classes_))
                if idx > 0:
                    index = index + bar_width

                self.ax.bar(
                    index, support, bar_width,
                    color=colors[idx], label=labels[idx]
                )

        return self.ax
626328
void render()
    {
        if (screen.isReady())
        {
            final Graphic g = screen.getGraphic();
            if (buf == null)
            {
                // Direct rendering
                target.render(g);
            }
            else
            {
                target.render(graphic);
                g.drawImage(filter.filter(buf), transform, 0, 0);
            }
        }
    }
1012921
private void onDataSetModifiedEvent(@Observes DataSetModifiedEvent event) {
        if (!editOn) {

            String targetUUID = event.getDataSetDef().getUUID();
            for (Displayer displayer : displayerCoordinator.getDisplayerList()) {
                DisplayerSettings settings = displayer.getDisplayerSettings();

                // Do nothing if the displayer:
                // - Is not drawn
                // - Is handling the refresh by itself
                // - Is not configured to be updated on stale data
                if (!displayer.isDrawn() || displayer.isRefreshOn() || !settings.isRefreshStaleData()) {
                    continue;
                }

                String uuid = null;
                DataSet dataSet = settings.getDataSet();
                if (dataSet != null) {
                    uuid = dataSet.getUUID();
                }
                DataSetLookup dataSetLookup = settings.getDataSetLookup();
                if (uuid == null && dataSetLookup != null) {
                    uuid = dataSetLookup.getDataSetUUID();
                }
                if (uuid != null && targetUUID.equals(uuid)) {
                    displayer.redraw();
                }
            }
        }
    }
1291393
function draw(renderer) {
         var color = renderer.getColor();
         var height = renderer.getHeight(); // draw the progress bar

         renderer.setColor("black");
         renderer.fillRect(this.pos.x, height / 2, this.width, this.height / 2);
         renderer.setColor("#55aa00");
         renderer.fillRect(this.pos.x, height / 2, this.progress, this.height / 2);
         renderer.setColor(color);
       }
1169075
def draw(self):
        

        if not self._header and not self._rows:
            return
        self._compute_cols_width()
        self._check_align()
        out = ""
        if self._has_border():
            out += self._hline()
        if self._header:
            out += self._draw_line(self._header, isheader=True)
            if self._has_header():
                out += self._hline_header()
        length = 0
        for row in self._rows:
            length += 1
            out += self._draw_line(row)
            if self._has_hlines() and length < len(self._rows):
                out += self._hline()
        if self._has_border():
            out += self._hline()
        return out[:-1]
543756
function () {
		var chart = this,
			options = chart.options,
			callback = chart.callback;

		// Check whether the chart is ready to render
		if (!chart.isReadyToRender()) {
			return;
		}

		// Create the container
		chart.getContainer();

		// Run an early event after the container and renderer are established
		fireEvent(chart, 'init');

		
		chart.resetMargins();
		chart.setChartSize();

		// Set the common chart properties (mainly invert) from the given series
		chart.propFromSeries();

		// get axes
		chart.getAxes();

		// Initialize the series
		each(options.series || [], function (serieOptions) {
			chart.initSeries(serieOptions);
		});

		chart.linkSeries();

		// Run an event after axes and series are initialized, but before render. At this stage,
		// the series data is indexed and cached in the xData and yData arrays, so we can access
		// those before rendering. Used in Highstock. 
		fireEvent(chart, 'beforeRender'); 

		// depends on inverted and on margins being set
		chart.pointer = new Pointer(chart, options);

		chart.render();

		// add canvas
		chart.renderer.draw();
		// run callbacks
		if (callback) {
			callback.apply(chart, [chart]);
		}
		each(chart.callbacks, function (fn) {
			fn.apply(chart, [chart]);
		});
		
		
		// If the chart was rendered outside the top container, put it back in
		chart.cloneRenderTo(true);

		fireEvent(chart, 'load');

	}
132843
def run(self):
        

        df = PaintingsInputData().load()

        # rename columns
        df.rename(columns={'paintingLabel': 'name'}, inplace=True)

        # get artist IDs, map via artist wiki ID
        artists = models.Entity.query_with_attributes('artist', self.client)
        df['artist_id'] = df['creator_wiki_id'].map(artists.set_index('wiki_id')['id'])

        # define attributes to create
        attribute_columns = ['name', 'wiki_id', 'area', 'decade', 'artist_id']

        # store entities and attributes
        self.store(df, attribute_columns)

        self.done()
24180
@Override
	public LegendItem getLegendItem(int datasetIndex, int series) {
		XYPlot plot = getPlot();
		if (plot == null) {
			return null;
		}

		XYDataset dataset = plot.getDataset(datasetIndex);
		if (dataset == null) {
			return null;
		}

		//jfreechart diff: set the line paint with the implementation of abstract getLinePaint
		Paint linePaint = getLinePaint(series);

		String label = getLegendItemLabelGenerator().generateLabel(dataset, 
				series);
		String description = label;
		String toolTipText = null;
		if (getLegendItemToolTipGenerator() != null) {
			toolTipText = getLegendItemToolTipGenerator().generateLabel(
					dataset, series);
		}
		String urlText = null;
		if (getLegendItemURLGenerator() != null) {
			urlText = getLegendItemURLGenerator().generateLabel(dataset, 
					series);
		}
		boolean shapeIsVisible = getItemShapeVisible(series, 0);
		Shape shape = lookupLegendShape(series);
		boolean shapeIsFilled = getItemShapeFilled(series, 0);
		Paint fillPaint = (this.getUseFillPaint() ? lookupSeriesFillPaint(series) 
				: linePaint);
		boolean shapeOutlineVisible = this.getDrawOutlines();
		Paint outlinePaint = (this.getUseOutlinePaint() ? lookupSeriesOutlinePaint(
				series) : linePaint);
		Stroke outlineStroke = lookupSeriesOutlineStroke(series);
		boolean lineVisible = getItemLineVisible(series, 0);
		Stroke lineStroke = lookupSeriesStroke(series);

		LegendItem result = new LegendItem(label, description, toolTipText, urlText, shapeIsVisible, shape,
				shapeIsFilled, fillPaint, shapeOutlineVisible, outlinePaint, outlineStroke, lineVisible,
				this.getLegendLine(), lineStroke, linePaint);
		result.setLabelFont(lookupLegendTextFont(series));
		Paint labelPaint = lookupLegendTextPaint(series);
		if (labelPaint != null) {
			result.setLabelPaint(labelPaint);
		}
		result.setSeriesKey(dataset.getSeriesKey(series));
		result.setSeriesIndex(series);
		result.setDataset(dataset);
		result.setDatasetIndex(datasetIndex);
		return result;
	}
1354827
public void lookupDataSet(final DataSetLookup request,
                              final DataSetReadyCallback listener) throws Exception {

        // Look always into the client data set manager.
        if (clientDataSetManager.getDataSet(request.getDataSetUUID()) != null) {
            DataSet dataSet = clientDataSetManager.lookupDataSet(request);
            listener.callback(dataSet);
        }
        // If the data set is not in client, then look up remotely (only if the remote access is available).
        else if (dataSetLookupServices != null) {

            // First of all, get the target data set estimated size.
            fetchMetadata(request.getDataSetUUID(),
                          new DataSetMetadataCallback() {
                              public void callback(DataSetMetadata metatada) {

                                  // Push the data set to client if and only if the push feature is enabled, the data set is
                                  // pushable & the data set is smaller than the max push size defined.
                                  DataSetDef dsetDef = metatada.getDefinition();
                                  int estimatedSize = metatada.getEstimatedSize() / 1000;
                                  boolean isPushable = dsetDef != null && dsetDef.isPushEnabled() && estimatedSize < dsetDef.getPushMaxSize();
                                  if (pushRemoteDataSetEnabled && isPushable) {

                                      // Check if a push is already in progress.
                                      // (This is necessary in order to avoid repeating multiple push requests over the same data set).
                                      DataSetPushHandler pushHandler = pushRequestMap.get(request.getDataSetUUID());
                                      if (pushHandler == null) {
                                          // Create a push handler.
                                          pushHandler = new DataSetPushHandler(metatada);

                                          // Send the lookup request to the server...
                                          DataSetLookup lookupSourceDataSet = new DataSetLookup(request.getDataSetUUID());
                                          _lookupDataSet(lookupSourceDataSet,
                                                         pushHandler);
                                      }
                                      // Register the lookup request into the current handler.
                                      pushHandler.registerLookup(request,
                                                                 listener);
                                  }
                                  // Lookup the remote data set otherwise.
                                  else {
                                      _lookupDataSet(request,
                                                     listener);
                                  }
                              }

                              // Data set metadata not found
                              public void notFound() {
                                  listener.notFound();
                              }

                              @Override
                              public boolean onError(final ClientRuntimeError error) {
                                  return listener.onError(error);
                              }
                          });
        }
        // Data set not found on client.
        else {
            listener.notFound();
        }
    }
920717
@Override
    protected void onGraphDraw(Canvas _Canvas) {
        super.onGraphDraw(_Canvas);
        if(mUseOverlapFill) {
            mLinePaint.setStyle(Paint.Style.FILL);
        }
        else {
            mLinePaint.setStrokeWidth(mLineStroke);
            mLinePaint.setStyle(Paint.Style.STROKE);
        }

        _Canvas.concat(mDrawMatrix);
        if(mHasNegativeValues) {
            _Canvas.translate(0, -mNegativeOffset);
        }

        // drawing of lines
        for (ValueLineSeries series : mSeries) {
            mLinePaint.setColor(series.getColor());
            _Canvas.drawPath(series.getPath(), mLinePaint);
        }
    }
837175
def display(self, typ, data):
        
        if hasattr(self, 'print_' + typ):
            getattr(self, 'print_' + typ)(data)

        elif not data:
            self._print("%s: %s" % (typ, data))

        elif isinstance(data, collections.Mapping):
            self._print("\n", typ)
            for k, v in data.items():
                self.print(k, v)

        elif isinstance(data, (list, tuple)):
            # tabular data layout for lists of dicts
            if isinstance(data[0], collections.Mapping):
                self.display_set(typ, data, self._get_columns(data[0]))
            else:
                for each in data:
                    self.print(typ, each)
        else:
            self._print("%s: %s" % (typ, data))

        self.fobj.flush()
669979
def draw_screen(self, surf):
    """"""
    # surf.fill(colors.black)
    if (self._render_rgb and self._obs.observation.HasField("render_data") and
        self._obs.observation.render_data.HasField("map")):
      self.draw_rendered_map(surf)
    else:
      self.draw_base_map(surf)
      self.draw_units(surf)
    self.draw_selection(surf)
    self.draw_build_target(surf)
    self.draw_overlay(surf)
    self.draw_commands(surf)
    self.draw_panel(surf)
1161046
def draw(self):
        
        if self.state > 0:
            self.renderer.draw_background(self.surface, self.layout.position, self.layout.size)
            for row in self.layout.rows:
                for key in row.keys:
                    self.renderer.draw_key(self.surface, key)
503190
public Map<String, Object> getDisplayDataMap() {
        return displayDataMap != null ? Collections.unmodifiableMap(displayDataMap) : Collections.emptyMap();
    }