Plotstack

버전 1.0.0.0 (2.43 KB) 작성자: Christos Saragiotis
A plot utility, to plot graphs one over the other (or one next to the other vertically)
다운로드 수: 239
업데이트 날짜: 2011/7/1

라이선스 보기

This is a utility to plot graphs one on top of the other or one next to the other for qualitative inspection.

It plots using MATLAB's plotting functions (such as plot, stem, stairs etc) and handles the plot properties (such as colors, line widths, marker sizes etc).

Essentially it creates subplots and eliminates their inner margins of the subplots.

The plots may be horizontal (one over the other) or vertical (one next to the other.

Below is the help file. The plots in the screenshot were created by running the example in the helpfile.

PLOTSTACK plots the columns in a matrix, one above the other.

CALL
[ax,ls] = plotstack(X,...); % X is the 2D array
[ax,ls] = plotstack(X,Y,...); % Y is the 2D array, X is the x-axis
[ax,ls] = plotstack(X,plotfun,...); % X is the 2D array, plotfun is
% plotting function
[ax,ls]ls = plotstack(X,Y,plotfun,...);

INPUT
plotfun: (function handle) plotting function to use. E.g. @plot, @stem,
@stairs. Default is @plot.
...: plotfun-specific properties and values, such as 'MarkerSize',
'Linewidth' etc.
An additional property is 'Vertical' to plot from
to top to bottom (see examples)

OUTPUT
ax: axis handles (for futher manipulation).
ls: lineseries handles (for further manipulation).

EXAMPLES
x = randn(100,10); % make random data
figure, plotstack(x,'k');
figure, plotstack(1:100,x,'m-*');
figure, plotstack(x,@stem,'MarkerSize',2);
figure, ax = plotstack((1:50)/50,x(1:50,1:5), @stairs, 'r','Vertical', 'Linewidth',2);
xlabel('time'),
for i = 1:length(ax),
set(get(ax(i),'Ylabel'),'String',sprintf('signal %d',i));
end

인용 양식

Christos Saragiotis (2024). Plotstack (https://www.mathworks.com/matlabcentral/fileexchange/32028-plotstack), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2009b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0