50ba3175创建于 2022年9月18日历史提交

Scaled Image

Examples

::

let C = matrix<Float64>(
    [[0.0, 2.0, 4.0, 6.0],
     [8.0, 10.0, 12.0, 14.0],
     [16.0, 18.0, 20.0, 22.0]])
imagesc(C)
colorbar()

Result:

.. image:: ../../../tests/imgs/imagesc/imagesc1.png :align: center :width: 360

::

let C = matrix<Float64>(
    [[0.0, 2.0, 4.0, 6.0],
     [8.0, 10.0, 12.0, 14.0],
     [16.0, 18.0, 20.0, 22.0]])
imagesc(5.0, 8.0, 3.0, 6.0, C)
colorbar()

Result:

.. image:: ../../../tests/imgs/imagesc/imagesc2.png :align: center :width: 360

::

let C = matrix<Float64>(
    [[0.0, 2.0, 4.0, 6.0],
     [8.0, 10.0, 12.0, 14.0],
     [16.0, 18.0, 20.0, 22.0]])
imagesc(5.0, 8.0, 3.0, 6.0, C)
gca().color_box_range(4.0, 18.0)

Result:

.. image:: ../../../tests/imgs/imagesc/imagesc3.png :align: center :width: 360

::

let C = matrix<Float64>(
    [[0.0, 2.0, 4.0, 6.0],
     [8.0, 10.0, 12.0, 14.0],
     [16.0, 18.0, 20.0, 22.0]])
let im = imagesc(5.0, 8.0, 3.0, 6.0, C)
gca().color_box_range(4.0, 18.0)
im.alpha(0.5)

Result:

.. image:: ../../../tests/imgs/imagesc/imagesc4.png :align: center :width: 360

Methods

========================= =========================================== Function Description ========================= =========================================== imagesc() 2 functions Show array as image and scale the colorbar ========================= ===========================================

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

.. function:: imagesc(C)

:param C: Matrix<Float64>, color of the image

Show array as image and scale the colorbar

.. function:: imagesc(x_min, x_max, y_min, y_max, C)

:param x_min: Float64
:param x_max: Float64
:param y_min: Float64
:param y_max: Float64
:param C: Matrix<Float64>

Show array as image and scale the colorbar in limited x and y range.