.. _ws_text_icon: ws_text =============================================== .. container:: .. container:: leftside .. image:: /_static/WS_TEXT.png :width: 48px .. container:: rightside Defines a text :ref:`Weather Symbol Object ` that can be visualised with :func:`plot`. .. include:: /api/icon_desc/include/ws.rst .. note:: This function performs the same task as the **Ws Text** icon in Metview’s :ref:`user interface `. It accepts its parameters as keyword arguments, described below. .. py:function:: ws_text(**kwargs) Defines a text :ref:`Weather Symbol Object `. :param text: The text. :type text: str :param font_family: Font family. :type font_family: {"arial", "courier", "helvetica", "times", "serif", "sansserif"}, default: "sansserif" :param font_size: Font size in points. :type font_size: number, default: 14 :param font_bold_style: Enable bold style. :type font_bold_style: {"on", "off"}, default: "off" :param font_italic_style: Enable italic style. :type font_italic_style: {"on", "off"}, default: "off" :param font_underline_style: Enable underline style. :type font_underline_style: {"on", "off"}, default: "off" :param font_colour: Font colour. :type font_colour: str, default: "black" :param text_alignment: Text alignment. :type text_alignment: {"left", "centre", "right", "justify"}, default: "left" :param line: Enable to draw text box outline. :type line: {"on", "off"}, default: "on" :param line_colour: Colour of the text box outline. Enabled when ``line`` is "on". :type line_colour: str, default: "black" :param line_thickness: Thickness of the text box outline. Enabled when ``line`` is "on". :type line_thickness: number, default: 1 :param line_style: Style of the text box outline. Enabled when ``line`` is "on". :type line_style: {"solid", "dash", "dot", "dash_dot", "dash_dot_dot"}, default: "solid" :param fill: Enable to fill the text box. :type fill: {"on", "off"}, default: "off" :param fill_colour: Fill colour of the text box. Enabled when ``fill`` is "on". :type fill_colour: str, default: "rgb(0.8,0.8,0.8)" :param width: Width of the text box. :type width: number, default: 0 :param height: Height of the text box. :type height: number, default: 0 :param x: The x coordinate of the top-left point of the text box. :type x: number, default: 0 :param y: The y coordinate of top-left point of the text box. :type y: number, default: 0 :param x: The x coordinates of the control points of the curve. :type x: ndarray or list of numbers, default: 0 :param y: The y coordinates of the control points of the curve. :type y: ndarray or list of numbers, default: 0 :param geolock: Sets the geolock on the item for interactive editing in the plot window. :type geolock: on_off, default: off :param tooltip: Text that appears as a tooltip when the visualised object is hovered over in Metview's plot window. :type tooltip: str :rtype: :class:`Request` .. mv-minigallery:: ws_text