Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning
Please note that because the Metview 3 Text Plotting icon (ptext) contains parameters for controlling the legend, using ptext disables the Metview 4 Legend (mlegend) functionality in order to avoid clashes. If you wish to use the new Legend functionality alongside text plotting specifications, you must use Metview 4's Text Plotting (mtext) icon instead of ptext.

 

Text Plotting

...

Text

...

Warning
See Legends, above, for information regarding the mixing of ptext() and mlegend().

...

Plotting

Metview 4 completely revised its handling of Text, Annotation and Legend Plotting. The mains differences are:

  • Text Plotting icon no longer has any legend parameters - these are all now contained in the Legend icon.
  • The way to specify user text in a title has changed a little. Metview 3 contained options to specify whether a title contained automatic text, user text or both; Metview 4 instead has a default title line which is "<magics_title/>". Any text line with this string will have the automatic title; lines without it will not.
  • Magics++ also has features, documented here, to:
    • automatically add GRIB meta-data to a 'semi-automatic' plot title using GRIB_API keys. For instance, instances:
      • where Metview 3 used !PARAM!  Metview 4 would use <grib_info key='name'/>
      .
      • provide two extra keys: base-date and valid-date
    • convert the date and time information according to a format string defined in C++ std::strftime (http://www.cplusplus.com/reference/ctime/strftime/)
  • Another commonly-encountered change is that instead of Text Reference Character Height, Metview now has Text Font Size.
  • In Macro, ptext is replaced by mtext.

Examples:

title1 = mtext (

                      text_line_count : 2,

                      text_line_1        : "<magics_title/>",

                      text_line_2        : str

                   )

title2 = mtext (

                      text_line_count : 4,

                      text_line_1        : "<font colour='red' size='0.5'> My </font> <font colour='blue'> text </font>",

                      text_line_2        : "<font colour='black' size='0.3'> <grib_info key='name'/> </font>",

                      text_line_3        : "<grib_info key='base-date' format='%Y-%m-%d %H:%M:00'/>",

                      text_line_4        : "Special C++ ctime characters: <grib_info key='valid-date' format='%A %B'/>"

                    )

 

Warning
See Legends, above, for information regarding the mixing of ptext() and mlegend().

Text View, Empty View and Annotation

...