You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: fcn_Animation_2DObstacle.m
    path of file: ./repos/paper-simulation/Zhao2018Affine/8-matlabcode-2017TACAffineMatlabCode
    
    the code of the file until where you have to start completion: function fcn_Animation_2DObstacle(p_all_time, error_all)
global nodenum edgenum neighborMat dim simTime leaderNum ki kp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% animation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    
function fcn_Animation_2DObstacle(p_all_time, error_all)
global nodenum edgenum neighborMat dim simTime leaderNum ki kp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% animation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all;
% mov = avifile('video1.avi');
figure;
set(gcf, 'unit', 'norm', 'pos', [0.1,0.1,0.72,0.8])
hAxisTraj=subplot(4,1,1:3);
hold on; box on; axis equal
xlim([-10,55])
ylim([-25,6])
%%%%%%%%%%%%%%%%%%%%%
% plot a subset of the data, because too much data
delta=50;
time_all=p_all_time.time(1:delta:end