Skip to content

Commit

Permalink
#191 plotPsychometricFunction now callable method of Model
Browse files Browse the repository at this point in the history
(think I forgot to stage this last time)
  • Loading branch information
Ben Vincent committed Jun 2, 2017
1 parent bbfca1d commit 89e2569
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions ddToolbox/models/parametric_models/Parametric.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ function plotPosteriorDiscountFunctionParams(obj, ind, varargin)
error('Currently only set up to plot univariate or bivariate distributions, ie discount functions 1 or 2 params.')
end
end

function plotPsychometricFunction(obj, ind, varargin)
%plotPsychometricFunction
%
% Optional arguments as key/value pairs
% 'axisHandle' - handle to axes
% 'figureHandle' - handle to figure

[figureHandle, axisHandle] = parseFigureAndAxisRequested(varargin{:});

responseErrorVariables = obj.getResponseErrorVariables();
psycho = PsychometricFunction('samples',...
obj.coda.getSamplesAtIndex_asStochastic(ind, responseErrorVariables));
psycho.plot(obj.plotOptions.pointEstimateType)
end

end

Expand Down Expand Up @@ -177,22 +192,7 @@ function plotAllTriPlots(obj, plotOptions, modelFilename)

end
end

function plotPsychometricFunction(obj, ind, varargin)
%plotPsychometricFunction
%
% Optional arguments as key/value pairs
% 'axisHandle' - handle to axes
% 'figureHandle' - handle to figure

[figureHandle, axisHandle] = parseFigureAndAxisRequested(varargin{:});

responseErrorVariables = obj.getResponseErrorVariables();
psycho = PsychometricFunction('samples',...
obj.coda.getSamplesAtIndex_asStochastic(ind, responseErrorVariables));
psycho.plot(obj.plotOptions.pointEstimateType)
end


end

end

0 comments on commit 89e2569

Please sign in to comment.