dashedline

バージョン 1.0.2 (2.7 KB) 作成者: Myrtle42
Plot dashed line
ダウンロード: 168
更新 2020/8/14

ライセンスの表示

Simple function to plot a straight dashed line with custom dash width. Gap width = dash width.

% DASHEDLINE(X,Y) plots a dashed line on the current axis along X and
% Y, with dash and gaps equal to 2 points. X and Y should each have
% exactly two elements defining the start and end of the line
%
% DASHEDLINE(X,Y, WIDTH) plots a dashed line with dash and gaps equal to
% WIDTH points
%
% H = DASHEDLINE(X,Y,...) returns a handle to the dashed line
%
%
% Example:
% x = get(gca,'XLim');
% y = [0 0];
% dashedline(x, y, 4)
%
% Note 1: the dash width is adjusted slightly to ensure a dash is present
% at the beginning and end of the line
%
% Note 2: point measurement assumes the dashed line is plotted along the
% whole width or height of the axis, otherwise it will be slightly off.
% 1 pt = 1/72 in = .3528 mm
%
% Includes plotboxpos, copyright 2010 Kelly Kearney

MATLAB リリースの互換性
作成: R2020a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

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

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

Added varargin for passing line properties

1.0.1

axis handle bug fixed

1.0.0