Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Confirmed.


Excerpt
hiddentrue

A positional title will not replace the default title, but will add to it. The solution is to create an additional empty title to effectively remove the default one.

Step-by-step guide

In Metview, a Text Plotting icon has two distinct modes, controlled by the parameter Text Mode, which can be either Title or Positional. When set to Title, it will replace any default title that Metview has generated for the data. When set to Positional, it will add a new text box to the plot. In this case, if you do not want the default title, you must remove it by creating an empty Title based Text Plotting object. The following Python code shows how:

Code Block
languagepy
import metview as mv

data = mv.read("/my/data.grib")

empty_title = mv.mtext(text_line_count = 0)

pos_title = mv.mtext(
    text_line_1         = "Hello World!",
    text_mode           = "positional",
    text_box_x_position = 0,
    text_box_y_position = 15,
    text_box_x_length   = 29,
    text_box_y_length   = 1
    )

mv.plot(data, empty_title, pos_title)

See also Customising Your Plot Title for more information about plot titles.

Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "metview-faqs" and label = "plots" and type = "page" and space = "UDOC"
labelskb-how-to-article