.. highlightlang:: us .. index:: plot .. _plot: plot ==== .. us.tag plot ENGLISH :ref:`plot` plots a x/y curve. .. function:: rvHandle = plot(rvX, rvY) rvHandle = plot(rvX, rvY, handle) .. us.return **Return Value** *rvHandle* is a vector with three elements: .. list-table:: :header-rows: 1 * - Value - Meaning * - rvHandle[1] - Handle of the page * - rvHandle[2] - Handle of the diagram (Layer) * - rvHandle[3] - Handle of the dataset .. us.params **Parameters** .. uparam:: rvX *rvX* is a real vector with x coordinates .. uparam:: rvY *rvY* is a real vector with y coordinates .. uparam:: handle *handle* is a layer handle or a page handle. If *handle* is a layer handle the curve will be added to specified layer. If *handle* is a page handle, a new layer will be created and added to the specified page. .. us.example **Example** The following example will create a diagram with a sine and a cosine curve :: x = linspace(0, 2*PI); y = sin(x); h1 = plot(x, y); y = cos(x) h2 = plot(x, y, h1[2]); .. seealso:: :ref:`DocCreate`, :ref:`PageCreate`, :ref:`PageGetParentDocument`, :ref:`LayerCreate`, :ref:`XYCreate`, :ref:`plotcategory`, :ref:`NC_plotcategory`, :ref:`GetParent` :sub:`id-1857435`