%This code loads data and recreate figures 20-17 of Spatial dynamics of flexible nanoswimmers under a rotating magnetic
%    field   by Chapnik Zvi and Or Yizhar https://doi.org/10.1103/vh58-lbb9

load('contoursdata.mat');
numPlots = length(allData);

for i = 1:numPlots
        figure('Color', 'w', 'Name', 'All Folder Plots');
        
        % Plot using saved data
        contourf(allData(i).X, allData(i).Y, allData(i).Z, allData(i).Levels);
        
        % Re-apply metadata
        title(allData(i).Title);
        xlabel(allData(i).XLabel);
        ylabel(allData(i).YLabel);
        
        c = colorbar;
   
        c.Label.String = allData(i).CBLabel;
    
 end

