Default title for plot
553302
def get_title(self):
        
        def fformat(x):  # float format
            if isinstance(x, (list, tuple)):
                return '[{0}]'.format(', '.join(map(fformat, x)))
            if isinstance(x, Quantity):
                x = x.value
            elif isinstance(x, str):
                warnings.warn('WARNING: fformat called with a' +
                              ' string. This has ' +
                              'been depricated and may disappear ' +
                              'in a future release.')
                x = float(x)
            return '{0:.2f}'.format(x)

        bits = [('Q', fformat(self.result.q))]
        bits.append(('tres', '{:.3g}'.format(self.qxfrm_args['tres'])))
        if self.qxfrm_args.get('qrange'):
            bits.append(('q-range', fformat(self.qxfrm_args['qrange'])))
        if self.qxfrm_args['whiten']:
            bits.append(('whitened',))
        bits.extend([
            ('f-range', fformat(self.result.yspan)),
            ('e-range', '[{:.3g}, {:.3g}]'.format(self.result.min(),
                                                  self.result.max())),
        ])
        return ', '.join([': '.join(bit) for bit in bits])
483232
def accept_default_labels(self, other):
        

        self.units_label = other.units_label
        self.name_label = other.name_label
        self.notes_label = other.notes_label
        self.desc_label = other.desc_label
        self.plot_label = other.plot_label
        self.axis_label = other.axis_label
        self.scale_label = other.scale_label
        self.min_label = other.min_label
        self.max_label = other.max_label
        self.fill_label = other.fill_label
        return
124570
def title(self):
        '''
        

        '''

        return self.title_left(on=False), self.title_center(on=False), \
               self.title_right(on=False)
453870
def make_title(self, chan, cycle, stage, evt_type):
        """"""
        cyc_str = None
        if cycle is not None:
            cyc_str = [str(c[2]) for c in cycle]
            cyc_str[0] = 'cycle ' + cyc_str[0]

        title = [' + '.join([str(x) for x in y]) for y in [chan, cyc_str,
                 stage, evt_type] if y is not None]

        return ', '.join(title)
543578
def _make_x_title(self):
        """"""
        y = (self.height - self.margin_box.bottom + self._x_labels_height)
        if self._x_title:
            for i, title_line in enumerate(self._x_title, 1):
                text = self.svg.node(
                    self.nodes['title'],
                    'text',
                    class_='title',
                    x=self.margin_box.left + self.view.width / 2,
                    y=y + i * (self.style.title_font_size + self.spacing)
                )
                text.text = title_line
165161
def setTitle(self, title):
        
        self._titleLabel.setText(title)
        self._titleLabel.adjustSize()
        self.adjustMargins()
794272
protected void customizeTitle(TextTitle title, Font font)
	{
		title.setFont(font);
		title.setTextAlignment(HorizontalAlignment.LEFT);
		title.setPaint(Color.BLACK);
		title.setBackgroundPaint(TRANSPARENT_COLOR);
	}
375037
function title(title, widths, opt){
  var wid = title.length;
  var total = widths.reduce((a, b) => a + b + 3, 0) - 1;
  var left = parseInt((total - wid) / 2);
  if (!opt.plain) title = '\u001b[1m' + title + '\u001b[22m';
  log(p[0][0] + widths.map(col => p.h + strN(col, p.h) + p.h).join(p.h) + p[0][2]);
  log(p.v + widths.map(col => ' ' + strN(col, ' ') + ' ').join(' ') + p.v);
  log(p.v + strN(left) + title + strN(total - left - wid) + p.v);
  log(p.v + widths.map(col => ' ' + strN(col, ' ') + ' ').join(' ') + p.v);
}
934295
def _decorate(self):
        """"""
        self._set_view()
        self._make_graph()
        self._axes()
        self._legend()
        self._make_title()
        self._make_x_title()
        self._make_y_title()
368023
def set_title(self, row, column, text):
        
        subplot = self.get_subplot_at(row, column)
        subplot.set_title(text)
645831
def axis_names(self) -> Tuple[str, ...]:
        """"""
        default = ["axis{0}".format(i) for i in range(self.ndim)]
        return tuple(self._meta_data.get("axis_names", None) or default)
68361
def add_borders(Figs, titles, border_color='#000000', text_color='#800080', con_id=""):

    
    def split_title(s):
        """
        Add '\n's to split of overly long titles
        """
        s_list = s.split(",")
        lines = []
        tot = 0
        line = []
        for i in s_list:
            tot += len(i)
            if tot < 30:
                line.append(i + ",")
            else:
                lines.append(" ".join(line))
                line = [i]
                tot = 0
        lines.append(" ".join(line))
        return "\n".join(lines).strip(',')

    # format contribution id if available
    if con_id:
        if not str(con_id).startswith("/"):
            con_id = "/" + str(con_id)

    import datetime
    now = datetime.datetime.utcnow()

    for key in list(Figs.keys()):

        fig = plt.figure(Figs[key])
        plot_title = split_title(titles[key]).strip().strip('\n')
        fig.set_figheight(5.5)
        #get returns Bbox with x0, y0, x1, y1
        pos = fig.gca().get_position()
        # tweak some of the default values
        w = pos.x1 - pos.x0
        h = (pos.y1 - pos.y0) / 1.1
        x = pos.x0
        y = pos.y0 * 1.3
        # set takes: left, bottom, width, height
        fig.gca().set_position([x, y, w, h])

        # add an axis covering the entire figure
        border_ax = fig.add_axes([0, 0, 1, 1])
        border_ax.set_frame_on(False)
        border_ax.set_xticks([])
        border_ax.set_yticks([])
        # add a border
        if "\n" in plot_title:
            y_val = 1.0  # lower border
            #fig.set_figheight(6.25)
        else:
            y_val = 1.04  # higher border
        #border_ax.text(-0.02, y_val, "                                                                                                   #                                                                                      |",
        #               horizontalalignment='left',
        #               verticalalignment='top',
        #               color=text_color,
        #               bbox=dict(edgecolor=border_color,
        #                         facecolor='#FFFFFF', linewidth=0.25),
        #               size=50)
        #border_ax.text(-0.02, 0, "|                                                                                                      #                                                                                   |",
        #               horizontalalignment='left',
        #               verticalalignment='bottom',
        #               color=text_color,
        #               bbox=dict(edgecolor=border_color,
        #                         facecolor='#FFFFFF', linewidth=0.25),
        #               size=20)#18)

        # add text

        border_ax.text((4. / fig.get_figwidth()) * 0.015, 0.03, now.strftime("%Y-%m-%d, %I:%M:%S {}".format('UT')),
                       horizontalalignment='left',
                       verticalalignment='top',
                       color=text_color,
                       size=10)
        border_ax.text(0.5, 0.98, plot_title,
                       horizontalalignment='center',
                       verticalalignment='top',
                       color=text_color,
                       size=20)
        border_ax.text(1 - (4. / fig.get_figwidth()) * 0.015, 0.03, 'earthref.org/MagIC{}'.format(con_id),
                       horizontalalignment='right',
                       verticalalignment='top',
                       color=text_color,
                       size=10)
    return Figs
773208
def set_title(self, name):
        
        self._set_attr(TIT2(encoding=3, text=name.decode('utf-8')))
502145
public ChartConfiguration<T> setSimpleTitle(String title) {
		if (title == null) {
			this.title = new Title(title);
		} else {
			this.title.setText(title);
		}
		return this;
	}
1066633
def set_title(self, title=None):
        
        title = self.title or title
        if title is not None:
            self.ax.set_title(title)
158013
function drawTitles() {
            if (hasTitle()) {
                // either use title provided from the data
                // or customTitle provided via API method call
                if (legendGroup) {
                    legendGroup.remove();
                }

                legendGroup = svg.select('.metadata-group')
                  .append('g')
                    .classed('legend-group', true)
                    .attr('transform', `translate(0, ${chartHeight / 2})`);


                // override title with customTitle if given
                if (customTitle) {
                    title = customTitle;
                }

                titleEl = legendGroup.selectAll('text.bullet-title')
                  .data([1])
                  .enter()
                    .append('text')
                      .attr('class', 'bullet-title x-axis-label')
                      .text(title);

                // either use subtitle provided from the data
                // or customSubtitle provided via API method call
                if (subtitle || customSubtitle) {

                    // override subtitle with customSubtitle if given
                    if (customSubtitle) {
                        subtitle = customSubtitle;
                    }

                    titleEl = legendGroup.selectAll('text.bullet-subtitle')
                      .data([1])
                      .enter()
                        .append('text')
                          .attr('class', 'bullet-subtitle x-axis-label')
                          .attr('y', subtitleSpacing)
                          .text(subtitle);
                }
            }
        }
74227
private boolean shouldTitleBeShown() {
        SharedPreferences sharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(getActivity());
        String key = getString(R.string.show_bottom_sheet_title_preference_key);
        boolean defaultValue =
                getResources().getBoolean(R.bool.show_bottom_sheet_title_preference_default_value);
        return sharedPreferences.getBoolean(key, defaultValue);
    }