From d69d503492bf40a55f09d90e98add60ec5eadf89 Mon Sep 17 00:00:00 2001 From: jlizier Date: Tue, 21 Aug 2018 20:54:41 +1000 Subject: [PATCH] Allowing figure number to be specified in plotOptions for Matlab/Octave plotLocalInfoMeasureFoooorCA --- demos/octave/CellularAutomata/plotLocalInfoMeasureForCA.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/demos/octave/CellularAutomata/plotLocalInfoMeasureForCA.m b/demos/octave/CellularAutomata/plotLocalInfoMeasureForCA.m index a4bb5eb..3f3d1c3 100755 --- a/demos/octave/CellularAutomata/plotLocalInfoMeasureForCA.m +++ b/demos/octave/CellularAutomata/plotLocalInfoMeasureForCA.m @@ -45,6 +45,7 @@ % - measureParams.j - we measure information transfer across j cells to the right per time step % - options - a stucture containing a range of other options, i.e.: % - plotOptions - structure as defined for the plotLocalInfoValues function +% - plotOptions.figNum - figure number to plot the info value profile in % - seed - state for the random number generator used to set the initial condition of the CA (use this % for reproducibility of plots, or to produce profiles for several different measures of the same CA raw states). % We set rand('state', options.seed) if options.seed is supplied, and restore the previous seed afterwards. @@ -107,7 +108,11 @@ function [caStates, localValues] = plotLocalInfoMeasureForCA(neighbourhood, base printDriver = options.saveImagesFormat; fontSize = 13; end - figNum = 2; + if (not(isfield(options.plotOptions, 'figNum'))) + figNum = 2; + else + figNum = options.plotOptions.figNum; + end toc % The offsets of the parents (see runCA for how this is computed, especially for even neighbourhood): fullSetOfParents = ceil(-neighbourhood / 2) : ceil(-neighbourhood / 2) + (neighbourhood-1);