ws_image

../../_images/WS_IMAGE.png

Defines an image Weather Symbol Object that can be visualised with plot(). Only SVG or PNG images are supported, which must be located in one of the directories described here.

New in Metview version 5.15.0.

Warning

The script-based Weather Symbol Object visualisation is currently restricted to the ‘screen’ output target (i.e. when the output is Metview’s plot window). On the one hand this requires the Metview GUI to be installed, on the other hand it limits the script-based visualisation to these cases:

  • execute the code in Metview’s Code Editor (the default output target here is already ‘screen’)

  • execute the code as a Jupyter notebook with the output target set to ‘screen’ (see setoutput()):

In any other cases, e.g. in batch mode, plot() does not work.

Note

This function performs the same task as the Ws Image icon in Metview’s user interface. It accepts its parameters as keyword arguments, described below.

ws_image(**kwargs)

Defines an image Weather Symbol Object.

Parameters
  • name (str) – The image file name. Only SVG or PNG images are supported. It is also possible to specify the name without the image suffix. In this case if multiple images match name the format is selected in this order: SVG, PNG. The image file must be located in one of the directories described here.

  • width (number, default: 30) – The width of the image (height is determined automatically).

  • x (number, default: 0) – The x coordinate of the centre of the image.

  • y (number, default: 0) – The y coordinate of the centre of the image.

  • geolock (on_off, default: off) – Sets the geolock on the item for interactive editing in the plot window.

  • tooltip (str) – Text that appears as a tooltip when the visualised object is hovered over in Metview’s plot window.

Return type

Request