View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
YIPLOT : Easy plot

1.0 | 2 ratings Rate this file 3 Downloads (last 30 days) File Size: 2.39 KB File ID: #28727 Version: 1.0

YIPLOT : Easy plot


Yi Sui (view profile)


YIPLOT makes plot much easier. you can use it to compress a bunch of codes into one single line.

| Watch this File

File Information

YIPLOT makes plot much easier.
    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
   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
    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.

MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
17 Sep 2010 Sean de

Sean de (view profile)

Why would having a convoluted string of characters meaningless to the rest of the world be easier than having a few lines of well understood functions?

17 Sep 2010 Ralf

Ralf (view profile)

Contact us