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: arPlotMCMCChains.m
    path of file: ./repos/d2d/arFramework3/MCMC
    
    the code of the file until where you have to start completion: % arPlotMCMCChains(jks, Nthinning, plot_trials)
% 
% Plots mcmc chains, saved in ar.ps parameter-wise after sampling them
% with arMC3()
% 
%   jks            parameters, which are plotted               [all]   
%   Nthinning      thinning rate for plotting                  [1]
%   plot_trials    Plot MCMC chains of trial points 
%                  instead of accepted points                  [false]
% 
% Example:
%       arPlotMCMCChains([1 2 35],10)
%
% See also arMC3, arPlotMar
    
function h = myRaiseFigure(figname)
global ar
openfigs = get(0,'Children');

figcolor = [1 1 1];

if(isfield(ar.ple, 'fighandel_multi') && ~isempty(ar.ple.fighandel_multi) && ...
    ar.ple.fighandel_multi ~= 0 && ...
    sum(ar.ple.fighandel_multi==openfigs)>0 && ...
    strcmp(get(ar.ple.fighandel_multi, 'Name'), figname))

    h = ar.ple.fighandel_multi;
    figure(h);
else
    h = figure('Name', figname, 'NumberTitle','off', ...
        'Units', 'normalized', 'Position', ...
        [0.1 0.1 0.6 0.8]);
    set(h,'Color', figcolor);
    ar.ple.fighandel_multi = h;
end