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: plePlot2D.m
    path of file: ./repos/d2d/arFramework3/PLE
    
    the code of the file until where you have to start completion: % Plot 2D log-Likelihood for arFitNonLin
%
% plePlot2D(jk1, jk2, [figure_number, nsteps, nlevels])
%
% figure_number     [1]
% nsteps            [100]
% nlevels           [40]

function plePlot2D(jk1, jk2, figure_number, nsteps, nlevels)

global ar

if(isempty(ar.ple))
   
    
function plePlot2D(jk1, jk2, figure_number, nsteps, nlevels)

global ar

if(isempty(ar.ple))
    error('perform ple before usage');
end
if(isempty(ar.ple.ps))
    return
end

if(~ar.qFit(jk1) || ~ar.qFit(jk2))
    error('specified parameters need to be free to fit');
end

if(~exist('figure_number', 'var'))
    figure_number = 1;
end
if(~exist('nsteps', 'var'))
    nsteps = 100;
end
if(~exist('nlevels', 'var'))
    nlevels = 40;
end

%% sampling range
oversamplefactor = 0.1;

k1low = min(ar.ple.conf_lb(:,jk1));
k1high = max(ar.ple.conf_ub(:,jk1));
if(isnan(k1low) || k1low==-Inf)
    k1low = min(ar.ple.ps{jk1}(:,jk1));
end