Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 4fda17a
  • /
  • MATHeAT
  • /
  • Code
  • /
  • MATHeAT.m
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:42a60372b64244fe64ee7d3f9988775101b24355
directory badge
swh:1:dir:dce62319a2ad3d9051b9409e5028c5321e28f15d

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
MATHeAT.m
%% Age-Elevation Relationship (AER)
% This script to plot(U-Th-Sm)/He thermochronology data trends in age, elevation,
% eU, and ESR.
%
% Input:
% A plain text file with 5 columns in order:
%   1. FT corrected age (Ma)
%   2. Error (Ma)
%   3. Elevation (m)
%   4. eU (ppm)
%   5. ESR (mm)
%
% See "..Example/NP.txt" for a template dataset (based on Macaulay et al., 2013
% and unpublished data by Lingxiao Gong).
%
% Output:
% A bubble chart with error bars, saved under "Example/" as both PDF and PNG.
%
% Lingxiao Gong (gong@uni-potsdam.de) 
% First release: April 2024
% Update: September 2025


clear all
close all

%% Paths
% Automatically set path relative to script location
% Script is inside AER_eU_ESR/Code
% Example data and output figures go to ../Example/
script_path  = fileparts(mfilename('fullpath'));
main_path    = fileparts(script_path);
example_path = fullfile(main_path, 'Example');

if ~exist(example_path, 'dir')
    mkdir(example_path);
end
% addpath(genpath('D:\MATLAB\MATLAB\toolbox\Crameri'));% colormap created by Fabio Crameri, need to download.

%% USER INPUT %% 
data_file = fullfile(example_path, 'NP.txt'); % Example input file, change to your file name
P = readmatrix(data_file);

A   = P(:,1); % Age [Ma]
Er  = P(:,2); % Error [Ma]
ELE = P(:,3); % Elevation [m]
eU  = P(:,4); % eU [ppm]
ESR = P(:,5); % ESR [mm]

%% Make Figure
figure(1)%(x,y,size,color)
bc = bubblechart(A,ELE,ESR,eU); % (x,y,size,color)
% Uncomment below if Fabio Crameri colormap is available
% crameri('hawaii');

b = bubblelegend('ESR [mm]','location','northeast');%add bubble legend

c = colorbar % add colorbar
c.Label.FontSize = 10;
%c =('Ticks',[10:10:60])% change the spacing of colorbar if you dislike the default one
c.Label.String = 'eU [ppm]'% add colorbar legend
xlabel('Age [Ma]')
ylabel('Elevation [m]')

% if you want to set the range of the axises
% ylim([2100 2700])
% xlim([0 30])
% ylim([2400 3700])
% xticks(0:5:30)
% yticks(2000:100:2700)
grid on;
bubblesize([5 25])% bubble size range

% Add horizontal error bars
hold on;
eb = errorbar(A, ELE, Er, 'horizontal', 'LineStyle','none');
set(eb, 'color', 'k', 'LineWidth', 1.2);

title('AER - North Profile')% NAME YOUR PLOTTING

%% Save plots
out_pdf = fullfile(example_path, 'NP_AER.pdf');
out_png = fullfile(example_path, 'NP_AER.png');

set(gcf, 'Units', 'inches');
screenposition = get(gcf, 'Position');
set(gcf, ...
    'PaperPosition',[0 0 screenposition(3:4)], ...
    'PaperSize',    [screenposition(3:4)]);

print(gcf, '-dpdf', '-painters', out_pdf);
saveas(gcf, out_png);

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API