Home > General-Functions > Graphics > plot_square_with_background.m

plot_square_with_background

PURPOSE ^

% plot box with background

SYNOPSIS ^

function plot_square_with_background(x,y,w,f1,f2)

DESCRIPTION ^

% plot box with background

 Usage:
   plot_square_with_background(x,y,w);

 x,y:  position
 w: sidelength

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% plot box with background
0002 %
0003 % Usage:
0004 %   plot_square_with_background(x,y,w);
0005 %
0006 % x,y:  position
0007 % w: sidelength
0008 
0009 function plot_square_with_background(x,y,w,f1,f2)
0010 
0011 if nargin < 4
0012     f1 = 4;
0013     f2 = 2;
0014 end
0015 
0016 hi = w/2;
0017 ho = hi;
0018 
0019 plot([x-hi,x-hi,x+hi,x+hi,x-hi],[y-hi,y+hi,y+hi,y-hi,y-hi],'-k','Linewidth',f1);
0020 plot([x-ho,x-ho,x+ho,x+ho,x-ho],[y-ho,y+ho,y+ho,y-ho,y-ho],'-y','Linewidth',f2);

Generated on Sat 21-Jul-2018 20:56:10 by m2html © 2005