Versions Compared

Key

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

...

  • 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 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:

 

Code Block
languagepy
str = "<grib_info key='base-date'/> &#160;"

...


str = str & "<grib_info key='centre'/> t+<grib_info key='step'/>"

...


str = str & " VT:<grib_info key='valid-date'/> &#160;"

...


str = str & "<grib_info key='level'/> hPa <grib_info key='name'/>"

...



title1 = mtext

...

 (
    text_line_count : 2,

...


    text_line_1

...

     : "<magics_title/>",

...


    text_line_

...

                   )

title2 = mtext (

...

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().

...