YIPLOT : Easy plot

버전 1.0.0.0 (2.39 KB) 작성자: Yi Sui
YIPLOT makes plot much easier. you can use it to compress a bunch of codes into one single line.
다운로드 수: 456
업데이트 날짜: 2010/9/16

라이선스 보기

YIPLOT makes plot much easier.
H=YIPLOT(X,Y,...)
H=YIPLOT(STR,Y)
H=YIPLOT(STR,X,Y,...)
STR is a charater string made from any elements below, seperated by
comma, eg. 'fig=1,lw=4,t=title,x=x axis label'

fig = # set # as current figure, same as command figure(#)
sub = # subplot(#)
lw = # set linewidth to #
t = text add title, title('text')
t# = text add title with fontsize #, title('text','fontsize',#)
x = text add X-axis label, xlabel('text')
x# = text add X-axis label with fontsize #, xlabel('text','fontsize',#)
y =, y# = add Y-axis label
z =, z# = add Z-axis label
f = # set fontsize # for all
b set fontweight as bold for all
grid grid on

EXAMPLE 1:
You can produce a graph of sin function with line width of 3, x-axis label of
'theta', y-axis label of 'sin(theta)', graph title of 'Plot of sin(theta)' like this:
x = -pi:.1:pi;
y = sin(x);
yiplot('lw=3,x=\theta, y=sin(\theta), t=Plot of sin(\theta)', x, y)

EXAMPLE 2:
Now set fontsize of x-label and y-label to 16, set fontsize of title to
20:
yiplot('lw=3,x16=\theta, y16=sin(\theta),t20=Plot of sin(\theta)',x,y)

EXAMPLE 3:
You can also add any arguments that you do in PLOT() command.
For example, you can plot red dashed line with star markers like this:
yiplot('lw=3,x16=\theta, y16=sin(\theta),t20=Plot of sin(\theta)',x,y,'*r--')

Copyright 2010 Y. Sui
$Date: 2010/9/15 $

See also plot, title, xlabel, ylabel, figure, subplot, grid.

인용 양식

Yi Sui (2024). YIPLOT : Easy plot (https://www.mathworks.com/matlabcentral/fileexchange/28727-yiplot-easy-plot), MATLAB Central File Exchange. 검색 날짜: .

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

Community Treasure Hunt

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

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