4dd7bf71创建于 2022年9月15日历史提交

General Methods

Global Methods

======================================= ================================= Method Description ======================================= ================================= save(filename, format) Save the image with specified format hold(v) Hold existing figures show() Display all open figures clear() Clear all figures subplot(rows, cols, plot_id) Get a handle of subplot title(str) Set a title for a figure xlabel(str) Set the label for the x-axis ylabel(str) Set the label for the y-axis xrange(start, end) Set the x-axis range yrange(start, end) Set the y-axis range xticks(ticks) Set the current tick locations of the x-axis xticklabels(ticks) Set the current tick labels of the x-axis yticks(ticks) Set the current tick locations of the y-axis yticklabels(ticks) Set the current tick labels of the y-axis axis(style) Set axis style axis(x_start, x_end, y_start, y_end) Set the range of axis tiledlayout(rows, cols) Build tiled layout nexttile() Get the handle of next tile zlabel(str) Set the label of z axis grid(v) Set the on/off status of grid figure() Show current figure gcf() Get the current figure ======================================= =================================

Description ^^^^^^^^^^^

.. function:: save(filename, format)

:param filename: String
:param format: String
:return: Bool

Save the image with specified format.

.. function:: hold(v)

:param v: Bool

Hold existing figures (if ``v`` is true) or cancel hold on existing figures
(if ``v`` is false).

.. function:: show()

Display all open figures.

.. function:: clear()

Clear all figures.

.. function:: subplot(rows, cols, plot_id)

:param rows: Int64
:param cols: Int64
:param plot_id: Int64
:return: AxesType

Get a handle of subplot. Here ``rows`` and ``cols`` specifies the number
of rows and number of columns in the current arrangement, and ``plot_id``
(between 0 and :math:`\mathrm{rows}\times\mathrm{cols}-1`) specifies the index counting
by row.

.. function:: title(str)

:param str: String

Set the title of the current figure to the given string.

.. function:: xlabel(str)

:param str: String

Set the label on the :math:`x`-axis of the current figure to the given string.

.. function:: ylabel(str)

:param str: String

Set the label onthe :math:`y`-axis of the current figure to the given string.

.. function:: xrange(start, end)

:param start: Float64
:param end: Float64

Set the range of the :math:`x`-axis to be the interval :math:`[\mathrm{start}, \mathrm{end}]`.

.. function:: yrange(start, end)

:param start: Float64
:param end: Float64

Set the range of the :math:`y`-axis to be the interval :math:`[\mathrm{start}, \mathrm{end}]`.

.. function:: xticks(ticks)

:param ticks: Vector<Float64>

Set the location of ticks on the :math:`x`-axis to the given vector.

.. function:: xticklabels(ticks)

:param ticks: Array<String>

Set the labels of ticks on the :math:`x`-axis to the given array of strings.

.. function:: yticks(ticks)

:param ticks: Vector<Float64>

Set the location of ticks on the :math:`y`-axis to the given vector.

.. function:: yticklabels(ticks)

:param ticks: Array<String>

Set the labels of ticks on the :math:`y`-axis to the given array of strings.

.. function:: axis(style)

:param style: AxisStyle

Set the style of current axis.

.. function:: axis(x_start: Float64, x_end: Float64, y_start: Float64, y_end: Float64)

:param x_start: Float64
:param x_end: Float64
:param y_start: Float64
:param y_end: Float64

Set the range of axis.

.. function:: tiledlayout(rows, cols)

:param rows: Int64
:param cols: Int64

Initialize tiled layout with the given number of rows and columns.

.. function:: nexttile()

Obtain the next tile in a tiled layout.

.. function:: zlabel(str)

:param str: String

Set the label of :math:`z`-axis.

.. function:: zlabel(axes, str)

:param axes: AxesType
:param str: String

Set the label of :math:`z`-axis.

.. function:: grid(v)

:param v: Bool

Set the on/off status of grid.

.. function:: figure()

Show the current figure.

.. function:: gcf()

:return: FigureType

Get current figure.