%% clear all variables in your workspace and close all open figures clear all close all %% import the data coredata = importdata('icecore_isotope_data.txt'); t_ice = coredata.data(:,1); % time, in years BP %% TODO: specify the remaining variables (uncomment lines by removing the % symbol in front) % d18O = [YOUR CODE HERE] % D18O, from NorthGRIP in per mil % dD = [YOUR CODE HERE]; % dD from Dome C, in per mil %% calculate the demperatures % T_greenland = [YOUR CODE HERE]; % T_antarctic = [YOUR CODE HERE]; %% plot the results % define fontsizes for your figure axisSize = 12; labelSize = 14; annotationSize = 10; legendSize = 10; % create the figure fig1 = figure; set(gca,'fontsize',axisSize) hold on % TODO: plot your time series % [you could also use two y-axes if you want to...] % plot(YOUR_X_VARIABLE, YOUR_Y_VARIABLE) % plot(YOUR_X_VARIABLE, YOUR_Y_VARIABLE) % TODO: add axis labels ylabel('your y-axis label','fontsize',labelSize) xlabel('your x-axis label','fontsize',labelSize) % TODO: specifiy the x-limits of your figure % minTime = YOUR_LOWER_TIME_LIMIT; % maxTime = YOUR_UPPER_TIME_LIMIT; % xlim([minTime maxTime]) % TODO: add a legend legend('first legend entry', 'second legend entry', 'fontsize', legendSize) %% add an text arrow annotations to a point on the plot % you can also save the figure as an image and add arrows and text in % photoshop/powerpoint, or whatever (if you want to do that, you can delete % this whole section % below is a helper function, don't worry about it ax2norm = @(x,y,ax) [... ax.Position(3)*((x-ax.XLim(1))./range(ax.XLim))+ ax.Position(1)... ax.Position(4)*((y-ax.YLim(1))./range(ax.YLim))+ ax.Position(2)]; ax = gca; % TODO: change the description to whatever you want the arrow to say description = 'this is interesting'; % this lets you pick the "from" and "to"' point of an arrow you want to draw % TODO: make two left-clicks on the figure to select them [x,y] = ginput(2); % this one actually adds the annotation to the figure XY = ax2norm(x,y,ax); annotation('textarrow', XY(:,1), XY(:,2), 'String', {description},'fontsize',annotationSize); % TODO: add another arrow to a point on the plot description = 'this is also interesting'; [x,y] = ginput(2); XY = ax2norm(x,y,ax); annotation('textarrow', XY(:,1), XY(:,2), 'String', {description},'fontsize',annotationSize); % TODO: add more arrows to interesting features of the plot, similarly to above % this saves the figure as an image saveas(fig1,'fig1.png') %% INSOLATION PART % import the data sundata = importdata('nhinso1.txt'); % TODO: specify the insolation time series as variables (if you want to) % create the insolation figure fig2 = figure; set(fig2,'units','normalized','outerposition',[0 0 0.5 0.75]) hold on % TODO: create the figure with the insolation time series, similar to the % figure created above % this saves the figure as an image saveas(fig2,'fig2.png') %% TODO: any other calculations you might want to make (not really necessary!)