Home > functions > internal > xp_libraries > xp_PlotFR2.m

xp_PlotFR2

PURPOSE ^

xp must be 1x1 (e.g. 0 dimensional)

SYNOPSIS ^

function hxp = xp_PlotFR2 (xp, op)

DESCRIPTION ^

 xp must be 1x1 (e.g. 0 dimensional)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 
0003 function hxp = xp_PlotFR2 (xp, op)
0004     % xp must be 1x1 (e.g. 0 dimensional)
0005     if nargin < 2
0006         op = struct;
0007     end
0008     
0009     hxp = struct;
0010     
0011     if isempty(op); op = struct; end;
0012     
0013     op = struct_addDef(op,'args',{});
0014     
0015     xlims = op.xlims;
0016     ylims = op.ylims;
0017     
0018     % Add dummy axis for variables
0019     Na = length(xp.axis);
0020     xp.axis(Na+1).name = 'variables';
0021     xp.axis(Na+1).values = {'v'};
0022 
0023     % Convert xp to DynaSim data struct
0024     data = dsMdd2ds(xp);
0025     
0026     % Feed into original PlotFR2 command, making sure it doesn't generate
0027     % new figures (rather, should produce it in the current subplot)
0028     hxp.hcurr = dsPlotFR2(data,op.args{:},'lock_gca',true);
0029     
0030     if ~isempty(xlims); xlim(xlims); end
0031     if ~isempty(ylims); ylim(ylims); end
0032 
0033 end
0034 
0035

Generated on Tue 12-Dec-2017 11:32:10 by m2html © 2005