ZoomPlot

バージョン 1.3.1 (9.01 KB) 作成者: Kepeng Qiu
MATLAB Code for Interactive Magnification of Customized Regions.

ダウンロード: 1.1K

更新 2022/1/23

GitHub から

GitHub でライセンスを表示

ZoomPlot

MATLAB Code for Interactive Magnification of Customized Regions.

Version 1.3, 17-JAN-2022

Email: iqiukp@outlook.com


✨ Main features

  • Easy application with just two lines of code
  • Interactive plotting
  • Support for image and figure classes
  • Support for multiple zoomed zones
  • Custom settings of parameters and themes

⚠️ Requirements

  • R2014b and later releases
  • Image Processing Toolbox

👉 How to use

  1. Add BaseZoom.m file to MATLAB search path or current working directory
  2. After completing the basic drawing, enter the following two lines of code in the command line window or your m-file:
% add a zoomed zone
zp = BaseZoom();
zp.plot;

if multiple zoomed zones are required, for example, 3 zoomed zones, the code are as follows:

% add 3 zoomed zones
zp = BaseZoom();
zp.plot;
zp.plot;
zp.plot;

👉 Examples for image class

Multiple types of image are supported for interactive magnification of customized regions in the ZoomPlot.

👉 Examples for figure class

Multiple zoomed zones are supported for figure class.

👉 How to customize the theme of the sub-coordinate system

Just modify the properties of the BaseZoom class file. The default properties are:

    % theme of inserted axes (sub-axes)
    properties
        subAxesBox = 'on'
        subAxesinsertedLineWidth = 1.2
        subAxesTickDirection = 'in'
        subAxesBackgroundColor = 'w'
    end

For example, remove the border of the sub-coordinate system and set the line width to 3:

    % theme of inserted axes (sub-axes)
    properties
        subAxesBox = 'off'
        subAxesinsertedLineWidth = 3
        subAxesTickDirection = 'in'
        subAxesBackgroundColor = 'w'
    end

👉 How to customize the theme of the zoomed zone

Just modify the properties of the BaseZoom class file. The default properties are:

    % theme of the zoomed zone (figures)
    properties
        rectangleColor = 'k'
        rectangleFaceColor = 'none'
        rectangleFaceAlpha = 0
        rectangleLineStyle = '-'
        rectangleLineWidth = 1.2
        rectangleInteractionsAllowed = 'none'
    end

For example, set the line color to red and the line width to 2:

    % theme of the zoomed zone (figures)
    properties
        rectangleColor = 'r'
        rectangleFaceColor = 'none'
        rectangleFaceAlpha = 0
        rectangleLineStyle = '-'
        rectangleLineWidth = 2
        rectangleInteractionsAllowed = 'none'
    end

👉 How to customize the theme of the connected lines

Just modify the properties of the BaseZoom class file. The default properties are:

    % theme of the connected lines (figures)
    properties
        % setting of lines between arrows
        figureConnectedLineStyle = ':'
        figureConnectedLineColor = 'k'
        figureConnectedLineWidth = 1.2
        % setting of start arrow
        figureConnectedLineStartHeadStyle = 'ellipse' % shape of start arrow
        figureConnectedLineStartHeadLength = 3
        figureConnectedLineStartHeadWidth = 3
        % setting of end arrow
        figureConnectedLineEndHeadStyle = 'cback2' % shape of ending arrow
        figureConnectedLineEndHeadLength = 7
        figureConnectedLineEndHeadWidth = 7
    end

For example, set the shape of ending arrow to 'ellipse' and the line color to 'b':

    % theme of the connected lines (figures)
    properties
        % setting of lines between arrows
        figureConnectedLineStyle = ':'
        figureConnectedLineColor = 'r'
        figureConnectedLineWidth = 1.2
        % setting of start arrow
        figureConnectedLineStartHeadStyle = 'ellipse' % shape of start arrow
        figureConnectedLineStartHeadLength = 3
        figureConnectedLineStartHeadWidth = 3
        % setting of end arrow
        figureConnectedLineEndHeadStyle = 'ellipse' % shape of ending arrow
        figureConnectedLineEndHeadLength = 7
        figureConnectedLineEndHeadWidth = 7
    end

引用

Kepeng Qiu (2023). ZoomPlot (https://github.com/iqiukp/ZoomPlot-MATLAB/releases/tag/v1.3.1), GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2021b
R2014b 以降のリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.3.1

See release notes for this release on GitHub: https://github.com/iqiukp/ZoomPlot-MATLAB/releases/tag/v1.3.1

1.3

See release notes for this release on GitHub: https://github.com/iqiukp/ZoomPlot-MATLAB/releases/tag/v1.3

1.2.1

See release notes for this release on GitHub: https://github.com/iqiukp/ZoomPlot/releases/tag/v1.2.1

1.2

See release notes for this release on GitHub: https://github.com/iqiukp/ZoomPlot/releases/tag/v1.2

1.1

See release notes for this release on GitHub: https://github.com/iqiukp/ZoomPlot/releases/tag/v1.1

1.0

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。