Our HSPs are about to be plotted. If we are using e-values, these need
        to be adjusted.

        @param titleAlignments: An instance of L{TitleAlignment}.
961342
def adjustHspsForPlotting(self, titleAlignments):
        
        # If we're using bit scores, there's nothing to do.
        if self.scoreClass is HigherIsBetterScore:
            return

        # Convert all e-values to high positive values, and keep track of the
        # maximum converted value.
        maxConvertedEValue = None
        zeroHsps = []

        # Note: don't call self.hsps() here because that will read them
        # from disk again, which is not what's wanted.
        for hsp in titleAlignments.hsps():
            if hsp.score.score == 0.0:
                zeroHsps.append(hsp)
            else:
                convertedEValue = -1.0 * log10(hsp.score.score)
                hsp.score.score = convertedEValue
                if (maxConvertedEValue is None or
                        convertedEValue > maxConvertedEValue):
                    maxConvertedEValue = convertedEValue

        if zeroHsps:
            # Save values so that we can use them in self.adjustPlot
            self._maxConvertedEValue = maxConvertedEValue
            self._zeroEValueFound = True

            # Adjust all zero e-value HSPs to have numerically high values.
            if self.randomizeZeroEValues:
                for hsp in zeroHsps:
                    hsp.score.score = (maxConvertedEValue + 2 + uniform(
                        0, ZERO_EVALUE_UPPER_RANDOM_INCREMENT))
            else:
                for count, hsp in enumerate(zeroHsps, start=1):
                    hsp.score.score = maxConvertedEValue + count
        else:
            self._zeroEValueFound = False
863660
@Override protected void initGraphics() {
        super.initGraphics();

        averagingListener = o -> handleEvents("AVERAGING_PERIOD");

        timeFormatter = DateTimeFormatter.ofPattern("HH:mm", tile.getLocale());

        state = State.CONSTANT;

        if (tile.isAutoScale()) tile.calcAutoScale();

        low            = tile.getMaxValue();
        high           = tile.getMinValue();
        movingAverage  = tile.getMovingAverage();
        noOfDatapoints = tile.getAveragingPeriod();
        dataList       = new LinkedList<>();

        // To get smooth lines in the chart we need at least 4 values
        if (noOfDatapoints < 4) throw new IllegalArgumentException("Please increase the averaging period to a value larger than 3.");

        graphBounds = new Rectangle(PREFERRED_WIDTH * 0.05, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.9, PREFERRED_HEIGHT * 0.45);

        titleText = new Text(tile.getTitle());
        titleText.setFill(tile.getTitleColor());
        Helper.enableNode(titleText, !tile.getTitle().isEmpty());

        valueText = new Text(String.format(locale, formatString, tile.getValue()));
        valueText.setBoundsType(TextBoundsType.VISUAL);
        valueText.setFill(tile.getValueColor());
        Helper.enableNode(valueText, tile.isValueVisible());

        valueUnitFlow = new TextFlow(valueText);
        valueUnitFlow.setTextAlignment(TextAlignment.RIGHT);

        highText = new Text();
        highText.setTextOrigin(VPos.BOTTOM);
        highText.setFill(tile.getValueColor());

        lowText = new Text();
        lowText.setTextOrigin(VPos.TOP);
        lowText.setFill(tile.getValueColor());

        text = new Text(tile.getText());
        text.setTextOrigin(VPos.TOP);
        text.setFill(tile.getTextColor());

        timeSpanText = new Text("");
        timeSpanText.setTextOrigin(VPos.TOP);
        timeSpanText.setFill(tile.getTextColor());
        Helper.enableNode(timeSpanText, !tile.isTextVisible());

        referenceLine = new Line();
        referenceLine.getStrokeDashArray().addAll(3d, 3d);
        referenceLine.setVisible(false);

        pathElements = new ArrayList<>(noOfDatapoints);
        pathElements.add(0, new MoveTo());
        for (int i = 1 ; i < noOfDatapoints ; i++) { pathElements.add(i, new LineTo()); }

        sparkLine = new Path();
        sparkLine.getElements().addAll(pathElements);
        sparkLine.setFill(null);
        sparkLine.setStroke(tile.getBarColor());
        sparkLine.setStrokeWidth(PREFERRED_WIDTH * 0.0075);
        sparkLine.setStrokeLineCap(StrokeLineCap.ROUND);
        sparkLine.setStrokeLineJoin(StrokeLineJoin.ROUND);

        dot = new Circle();
        dot.setFill(tile.getBarColor());
        dot.setVisible(false);

        triangle = new Path();
        triangle.setStroke(null);
        triangle.setFill(state.color);
        indicatorPane = new StackPane(triangle);

        changeText = new Label(String.format(locale, "%." + tile.getTickLabelDecimals() + "f", (tile.getCurrentValue() - tile.getReferenceValue())));
        changeText.setTextFill(state.color);
        changeText.setAlignment(Pos.CENTER_RIGHT);

        changePercentageText = new Text(new StringBuilder().append(String.format(locale, "%." + tile.getTickLabelDecimals() + "f", (tile.getCurrentValue() / tile.getReferenceValue() * 100.0) - 100.0)).append("\u0025").toString());
        changePercentageText.setFill(state.color);

        changePercentageFlow = new TextFlow(indicatorPane, changePercentageText);
        changePercentageFlow.setTextAlignment(TextAlignment.RIGHT);

        getPane().getChildren().addAll(titleText, valueUnitFlow, sparkLine, dot, referenceLine, highText, lowText, timeSpanText, text, changeText, changePercentageFlow);
    }
387722
def _set_pyqtgraph_title(layout):
    
    if 'title_size' in pytplot.tplot_opt_glob:
        size = pytplot.tplot_opt_glob['title_size']
    if 'title_text' in pytplot.tplot_opt_glob:
        if pytplot.tplot_opt_glob['title_text'] != '':
            layout.addItem(LabelItem(pytplot.tplot_opt_glob['title_text'], size=size, color='k'), row=0, col=0)
            return True
    return False
801326
public void setTitle(java.lang.String title) {
        getStateHelper().put(PropertyKeys.title, title);
        handleAttribute("title", title);
    }
1260879
public void setCaptionDescriptions(java.util.Collection<CaptionDescriptionPreset> captionDescriptions) {
        if (captionDescriptions == null) {
            this.captionDescriptions = null;
            return;
        }

        this.captionDescriptions = new java.util.ArrayList<CaptionDescriptionPreset>(captionDescriptions);
    }
1231445
@Override
    public void setTitle(final String title) {
        if (this.title == null) {
            this.title = new SyndContentImpl();
        }
        this.title.setValue(title);
    }
826134
public void setTitle(String title, int type)
	{
		if (allow(type&ID3V1))
		{
			id3v1.setTitle(title);
		}
		if (allow(type&ID3V2))
		{
			id3v2.setTextFrame(ID3v2Frames.TITLE, title);
		}
	}
952832
public void setAlignment(String alignment) {
        if (ElementTags.ALIGN_CENTER.equalsIgnoreCase(alignment)) {
            this.alignment = Element.ALIGN_CENTER;
            return;
        }
        if (ElementTags.ALIGN_RIGHT.equalsIgnoreCase(alignment)) {
            this.alignment = Element.ALIGN_RIGHT;
            return;
        }
        if (ElementTags.ALIGN_JUSTIFIED.equalsIgnoreCase(alignment)) {
            this.alignment = Element.ALIGN_JUSTIFIED;
            return;
        }
        if (ElementTags.ALIGN_JUSTIFIED_ALL.equalsIgnoreCase(alignment)) {
            this.alignment = Element.ALIGN_JUSTIFIED_ALL;
            return;
        }
        this.alignment = Element.ALIGN_LEFT;
    }
970591
private void drawYValues(Graphics2D chartGraphics) {
    if (!showYAxisValues) {
      return;
    }

    chartGraphics.setColor(axisValuesColour);

    for (int i = 0; i < yValues.length; i++) {
      if (i % yAxisValuesFrequency != 0) {
        continue;
      }

      String yValueStr = yValues[i].toString();

      chartGraphics.setFont(axisValuesFont);
      FontMetrics metrics = chartGraphics.getFontMetrics();

      int valueWidth = metrics.stringWidth(yValueStr);

      if (yValuesHorizontal) {
        // Draw the value with whatever font is now set.
        int valueXPos = margin + yAxisLabelSize.height + (yAxisValuesWidthMax - valueWidth);
        int valueYPos = heatMapTL.y + (i * cellSize.height) + (cellSize.height / 2)
            + (yAxisValuesAscent / 2);

        chartGraphics.drawString(yValueStr, valueXPos, valueYPos);
      }
      else {
        int valueXPos = margin + yAxisLabelSize.height + yAxisValuesAscent;
        int valueYPos = heatMapTL.y + (i * cellSize.height) + (cellSize.height / 2)
            + (valueWidth / 2);

        // Create 270 degree rotated transform.
        AffineTransform transform = chartGraphics.getTransform();
        AffineTransform originalTransform = (AffineTransform) transform.clone();
        transform.rotate(Math.toRadians(270), valueXPos, valueYPos);
        chartGraphics.setTransform(transform);

        // Draw the string.
        chartGraphics.drawString(yValueStr, valueXPos, valueYPos);

        // Revert to original transform before rotation.
        chartGraphics.setTransform(originalTransform);
      }
    }
  }
632532
public void setTitle(final String title, final Serializable... args) {
		getOrCreateComponentModel().title = I18nUtilities.asMessage(title, args);
	}
881916
@Override
    public void setTitles(String[] titles) {
        if(titles!=null){
            mLinearLayoutPinTexts.removeAllViews();
            mPinTitles = titles;
            pinTitlesIds = new int[titles.length];
            for (int i = 0; i < titles.length; i++) {
                mLinearLayoutPinTexts.addView(generatePinText(i, titles), i);
            }
        }
    }
469174
protected void layoutCharts() {
        //Pre-sort charts by group column
        MultiValuedMap<DJGroup, DJChart> mmap = new ArrayListValuedHashMap<DJGroup, DJChart>();
        for (DJChart djChart : getReport().getCharts()) {
            mmap.put(djChart.getColumnsGroup(), djChart);
        }

        for (DJGroup key : mmap.keySet()) {
            Collection<DJChart> charts = mmap.get(key);
            List<DJChart> l = new ArrayList<DJChart>(charts);
            //Reverse iteration of the charts to meet insertion order
            for (int i = l.size(); i > 0; i--) {
                DJChart djChart = l.get(i - 1);
                JRDesignChart chart = createChart(djChart);

                //Charts has their own band, so they are added in the band at Y=0
                JRDesignBand band = createGroupForChartAndGetBand(djChart);
                band.addElement(chart);
            }
        }

        //Pre-sort charts by group column
        MultiValuedMap<PropertyColumn, ar.com.fdvs.dj.domain.chart.DJChart> mmap2 = new ArrayListValuedHashMap<PropertyColumn, ar.com.fdvs.dj.domain.chart.DJChart>();
        for (ar.com.fdvs.dj.domain.chart.DJChart djChart : getReport().getNewCharts()) {
            mmap2.put(djChart.getDataset().getColumnsGroup(), djChart);
        }

        for (PropertyColumn key : mmap2.keySet()) {
            Collection<ar.com.fdvs.dj.domain.chart.DJChart> charts = mmap2.get(key);
            ArrayList<ar.com.fdvs.dj.domain.chart.DJChart> l = new ArrayList<ar.com.fdvs.dj.domain.chart.DJChart>(charts);
            //Reverse iteration of the charts to meet insertion order
            for (int i = l.size(); i > 0; i--) {
                ar.com.fdvs.dj.domain.chart.DJChart djChart = l.get(i - 1);
                String name = "chart_" + (i - 1) + new Date().getTime();
                JRDesignChart chart = createChart(djChart, name);

                if (djChart.getLink() != null)
                    HyperLinkUtil.applyHyperLinkToElement((DynamicJasperDesign) getDesign(), djChart.getLink(), chart, name + "_hyperlink");

                //Charts has their own band, so they are added in the band at Y=0
                JRDesignBand band = createGroupForChartAndGetBand(djChart);
                band.addElement(chart);
            }
        }
    }
634208
@Override
	public void setTitle(String title) {
		buttonAction.setTitle(title);
		titleLabel.setContents(prepareTitle());
	}
988873
function () {
		if (this.options.chart.alignTicks !== false) {
			each(this.axes, function (axis) {
				axis.adjustTickAmount();
			});
		}
		this.maxTicks = null;
	}
479875
private void drawTitle(Graphics2D chartGraphics) {
    if (title != null) {
      // Strings are drawn from the baseline position of the leftmost char.
      int yTitle = (margin / 2) + titleAscent;
      int xTitle = (chartSize.width / 2) - (titleSize.width / 2);

      chartGraphics.setFont(titleFont);
      chartGraphics.setColor(titleColour);
      chartGraphics.drawString(title, xTitle, yTitle);
    }
  }
485850
public void setTitleVisible(final boolean VISIBLE) {
        if (null == titleVisible) {
            _titleVisible = VISIBLE;
            fireUpdateEvent(VISIBILITY_EVENT);
        } else {
            titleVisible.set(VISIBLE);
        }
    }
104170
private void init(final String title, final int initialWidth, final int initialHeight,
		final Component component)
	{
		if (title != null)
		{
			setTitle(title);
		}
		setInitialWidth(initialWidth);
		setInitialHeight(initialHeight);
		setContent(component);
	}