Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 Jun 20;16:28256. doi: 10.1038/s41598-026-58501-2

Stratapy: a tool for automated stratigraphic log visualisation

Jack Lee Smith 1,✉, Christina Antoniou 1, Ruaridh Alexander 1
PMCID: PMC13558613  PMID: 42323360

Abstract

Stratigraphic logs are the fundamental interface between geological observations and scientific interpretation. Manual log visualisation is time-consuming and difficult to reproduce, yet existing digitisation tools are limited and often tailored to specific fields and applications, with many unable to provide core functions. We present stratapy: a Python package for rapid, high-quality log digitisation, designed to be accessible for non-programmers. The tool enables scientists across a range of disciplines to rapidly generate publication-quality stratigraphic logs with basic text- or spreadsheet-based inputs. We have designed stratapy to be accessible even to non-programmers while maintaining a high degree of flexibility in both style and function using a simple parameter-based customisation approach. We incorporate standardised lithological patterns and curated geological features and symbology, as well as automatic correlation with the chronostratigraphic column, the addition of sample locations, annotations and more. For more tailored visualisation, stratapy can easily assemble multi-panel or stratigraphically correlated logs to illustrate complex systems. With applications across research and industry, we create a standardised framework for log illustration and digitisation. This tool will modernise scientific workflows, improving the quality of stratigraphic logs and their interpretation, while contributing towards improved digital practices in the Earth sciences.

Keywords: Stratigraphy, Stratigraphic log, Software, Data visualisation, Graphics

Subject terms: Mathematics and computing, Solid Earth sciences

Introduction

Stratigraphic logs are a crucial tool that enable scientists to transform physical, three-dimensional field observations of vertical sections of rocks (lithostratigraphic units) from outcrops or boreholes into graphical representations. Detailed logs also serve as a fundamental tool for the interpretation of observations and the reconstruction of past depositional environments and geological processes and products across various spatial and temporal scales.

Stratigraphic logs are widely used within the geoscience community, and different groups and sub-disciplines have a particular focus, preferring a unique style and format to represent their stratigraphic sequences1. For example, sedimentologists are interested in displaying sedimentary structures and products within a stratigraphic sequence to allow for the reconstruction of palaeoenvironmental depositional and/or climatic conditions (e.g., shallow-marine, aeolian, or fluvial systems during wet, humid, or dry climates)2–5. Furthermore, the desired level of detail to record sequences is highly variable depending on the research aim. Microscale logs often display high-resolution geological observations, where millimetre to centimetre-scale sedimentary features are important, e.g., laminations or normal grading6,7. In contrast, macro-scale sedimentary logs, where several hundreds to thousands of metres of sedimentary units are described, particularly in deep time, are used for section correlation or to identify bulk facies changes over extended intervals8. Volcanologists interested in the eruptive history of a particular volcano concentrate on representing unit (e.g., tephra layer) thickness and variable grain compositions (such as lithics and pumice) to illustrate the changing eruptive cycles within a pyroclastic sequence9–11. In industry, stratigraphic logs are used to investigate hydrocarbon reservoirs or evaluate Inline graphic or Inline graphic storage potential, often visualised in composite or correlated logs, or shown alongside complementary datasets12–14. Across all disciplines, stratigraphic logs may be standalone or form a minor component of a larger figure e.g., containing palaeontological, sequence stratigraphic, palaeomagnetic, or geochemical data15–17.

Variations in visual representations of stratigraphic logs across all disciplines, driven by differences in research objectives, application purposes, or the distinction between academic and industrial use, lead to a need for tailored specifications within a constructed log. The same stratigraphic sequence could be illustrated differently depending on whether it was published in an academic journal or a technical report in industry; it could be produced using two contrasting formats, where symbols, colours, and labels for the same features (i.e., rock lithologies) may vary. Grain size axes may be displayed in high or low resolution, and particular features (e.g., fossils or the presence or absence of minerals) may or may not be displayed for different research purposes despite being present in the stratigraphic sequence. These vast differences in log construction and visual layout affect a researchers’ ability to compare, contrast and interpret logs from similar studies or regions, leading to overly complicated analysis, potential errors in geological modelling, and misinterpretations of geological processes.

Traditionally drawn by hand in the field, logs are often difficult to reproduce digitally, or to share and analyse using modern computational tools. Manual creation and redrafting in design software is time-consuming and a laborious process requiring days or weeks, causing researchers to omit detail, obscure subtle geological features, and reduce visual quality and fidelity of the resulting figure. This reliance on manual practices results in figures poorly suited for integration into digital databases and workflows. As the geoscience community moves toward a “big data” era and aims to leverage the benefits of artificial intelligence, the persistence of non-standardised, poor-quality stratigraphic visualisation represents a barrier to reproducible science, efficient resource management, and improving our collective understanding of the Earth and its processes.

There are a variety of existing tools and software designed to help geologists create stratigraphic logs, all of which have various limitations, with many researchers opting to create their logs manually in design software such as Inkscape, Adobe Illustrator, or others. Table 1 highlights the availability of key logging features in stratapy and other existing software programs. Most available software packages produce tabular outputs for single logs, as opposed to purely graphical representations which are more commonly used in publications and presentations. Some existing tools such as SedLog18 and PSICAT19 present the user with a graphical user interface (GUI), resulting in time-consuming log creation. With such tools, it can be time-saving to create a simple layout using the software before ‘beautifying’ the tool’s native output in a separate digital illustration software20, limiting reproducibility and reducing efficiency and functionality. Other programming-based software such as litholog20 and StratiLib21 offer more flexibility but are limited in their functionality and customisation capability, as well as sometimes containing insufficient or outdated documentation.

Table 1.

Comparison of key features between existing stratigraphic log tools and stratapy.

Stratigraphic log tools
Criteria SedLog StratiLib litholog PSICAT stratapy
User Focus Sedimentology Sedimentology Sedimentology & quantitative analysis Geological boreholes & cores All Earth Science disciplines
User Interface GUI Code Code GUI Code
Last Updated 2015 2022 2022 2026 2026
Log Format Tabular log Tabular log Graphical log, fixed layout Graphical log, fixed layout Graphical log, customisable layout
Log Customisation ✓ Manual selection ✘ ✘ ✘ ✓ Parameter-based customisation
Automatic Legend Generation ✘ ✘ ✘ ✓ ✓
Available Lithologies ≤ 35 35 4 USGS ≥ 200 USGS & more
Features ✓ ✓ ✘ ✓ ✓
Minerals ✘ ✘ ✘ ✘ ✓
Bed Contacts ✘ ✘ ✘ ✘ ✓
Asset Customisation ✓ Manual.svg import ✘ ✓ Lithologies only ✓ Lithologies & features only ✓ All assets
Built-in Chrono- stratigraphy ✘ ✘ ✘ ✘ ✓
Multi-log Figures ✘ ✘ ✘ ✘ ✓
Software Integration ✘ SedLog & Python Ecosystem Python Ecosystem ✘ Python Ecosystem
User Aids YouTube tutorial, limited documentation Example notebooks Limited documentation YouTube tutorials, user manual Extensive documentation, tutorials and example notebooks
Export Formats .pdf, .svg, .jpeg .png .png, .jpeg .pdf, .svg, .png .pdf, .svg, .png, .jpeg, and any other format depending on your environment

In addition, existing packages contain a limited range of lithological patterns and customisation capabilities, with a default range of only a handful of colours and simple patterns available in many cases. Although some standardised sets of lithologies and features exist, including the United States Geological Survey (USGS) lithological swatch collection, those patterns are generally not integrated into existing tools, with some only providing smaller sets of patterns and features. Furthermore, most existing log generation/visualisation tools do not provide mechanisms for simple functionality. A legend is a critical feature on any stratigraphic log, particularly one that will consider the chronology of lithologies present in the stratigraphic sequence and incorporate all other non-lithological features (e.g., fossils, minerals, sedimentary structures and so on), yet very few existing tools enable automatic legend generation. Customisation of the layout, display or style of the logs (e.g., simple log, grain size axis) is also often not achievable or easy, nor do many existing tools have methods to implement additional features such as complementary chronostratigraphy, trends (such as palaeocurrents or palaeo sea-level indicators), or sample locations.

To address limitations in existing stratigraphic logging software, we present stratapy: an accessible, user-friendly and open source Python package for generating high-quality, publication-ready graphical logs. It enables rapid and fully customisable log creation, while aiming to be easy-to-use for those with no prior Python experience through its user-friendly design and comprehensive documentation and tutorials. Functionality to add scientific features or indicators such as chronostratigraphy, trends, minerals, features, and more are included, as are ways to rapidly and reliably create logs in bulk, or multiple logs/datasets within one figure. Also offered in stratapy is a built-in, curated selection of all USGS lithological patterns, both coloured and black-and-white, amongst other bespoke lithologies and features made specifically for stratapy, to cater to a range of disciplines. By modernising and standardising stratigraphic log workflows, stratapy is scalable from metre-scale sedimentary outcrops to kilometre-scale petrophysical logs, saving users hours of time while improving visual quality and consistency.

Results

Software architecture

An overview of stratapy’s architecture is shown in Figure 1. Developing a Python package was favoured over constructing a GUI or software application to enable a wide range of users to exercise their needs, offering varying levels of flexibility, customisation, and control of the resultant logs through an easy-to-use programming language. A code-based approach also ensures that logs can be created in a robust and repeatable manner, with files saved and re-run to reliably recreate the same outputs at a later time, if desired.

Fig. 1.

Fig. 1

Illustration of the main functions and features of stratapy. Data are taken from literature2,8,31,45, as well as the authors’ own research. Each sub-figure in this diagram has been produced directly in Python using stratapy with no subsequent editing; the majority of these examples are discussed in more detail later in this work or are available to view or reproduce in the accompanying documentation and example notebooks.

Users can either download stratapy to their own device, or can use web-based coding environments to run code online, eliminating the need to download and install any program language or software on a device (although stratapy can of course still be used in this way). To create a log, users provide an input file (e.g., .CSV, .XLSX) and can generate a log in seconds from just three lines of code, as illustrated in Figure 2. This design is intended to make it easy to use with minimum effort, even in field-based scenarios where time may be limited.

Fig. 2.

Fig. 2

A minimal working example to create a log with stratapy. The tabular input structure is saved as a CSV, TXT, or XLSX file and three lines of Python code are used to create the log as shown, with no subsequent editing.

Logs created with stratapy can easily be placed into existing Matplotlib visualisations22, allowing data to be displayed in conjunction with other datasets, as shown in the centre-right panel of Figure 1. This streamlines the creation of complex, publication-quality figures by enabling secondary data to complement stratigraphy, bridging the gap between raw field observations and sophisticated, informative visuals. In addition, given individual preferences between users and disciplines, stratapy’s interoperability enables logs to be exported in formats including, but not limited to, scalable vector graphics (SVG), postscript (PS), or encapsulated postscript (EPS), in addition to other raster or mixed formats like PNG, PDF, JPG, and others.

Digital logs are often not reproducible by others in the community if original design files are not provided. Workflows become complex and prolonged when errors or additions lead to lengthy procedures to edit a static graphic. In stratapy, such issues are negated by enabling users to reproduce figures from an original input file or piece of code. Once generated, stratapy logs can be imported into other graphic design software packages, such as Inkscape or Adobe Illustrator, to allow manual adjustments of the output, if necessary.

Extensive documentation is available online (see ‘Data Availability’) which explains how to install, use, and work with stratapy. It contains examples and tutorials for users of all levels of prior programming experience to easily use. In addition, a gallery of figures provides the input files and code required to reproduce a vast range of logs, which can easily be copied and edited as necessary. All customisation and style options are explained in the documentation, split into short sections for each customisable aspect of the log, but are summarised in the following section.

Function and capability

Usage

Successions in stratapy are built on a bed-by-bed basis, with eleven parameters controlling the customisation of each bed as summarised below, though full details can be found in the online documentation.

  • Height/age – the position of unit tops; sequences can be represented in height, depth, age, or any other monotonic reference frame

  • Rock – lithology of this unit from the built-in catalogue or customised patterns

  • Thickness – thickness of the unit, using any preferred metric system (autofills if left blank)

  • Bottom_grain and top_grain – describes intra-bed grain size variation from a range of presets or customisable values

  • Connection_type – describes intra-bed grain size transitions (e.g., sawtooth, smoothed)

  • Erosion – controls the geometry of basal contacts to indicate erosive, undulatory, irregular or complex bedding surfaces

  • Lenses – indicates presence of intra-bed lenticular beds from the range of available lithological patterns

  • Minerals – indicates the presence of minerals in the bed

  • Features – displays palaeontological, sedimentological, volcanological and tectonic features

  • Contact – defines basal boundary types (e.g., gradational, sharp)

To produce the simplest stratigraphic log, only the lithology and height/age columns are required. Once input files have been created, which could also be done on-site in the field, the simple workflow design of stratapy means logs can be produced quickly starting from three lines of code, aiding ease-of-use for those inexperienced with Python. Figure 2 provides an example input table, alongside the three lines of code required to produce the log. Those new to programming can copy and paste examples from stratapy’s documentation, changing only the name of their desired file. Once input files have been prepared, many logs can be produced automatically.

A field-drawn sketch-log can be converted to a CSV file in a matter of minutes, which is especially valuable if dealing with numerous stratigraphic sequences or time constraints. Creating digital logs by hand is extremely time-consuming, therefore, stratapy can quickly produce standardised, high-quality logs with enhanced abilities such as, but not limited to, correlated logs to compare stratigraphic sequences across a study area, even with no prior programming experience. Different disciplines require a variety of log types to appropriately display their data. As such, stratapy provides the flexibility required to generate a range of log types. This includes multi-panel logs, simple logs with no grain size component, and logs with grain size variations indicated. These changes to the style or layout of logs are achieved through stratapy’s simple, ‘parameter-based’ customisation approach, as illustrated in Figure 3. Through these design features, stratapy enables easy and intuitive configuration of a log or figure from a single input file.

Fig. 3.

Fig. 3

Three logs created using the input file shown in Figure 2 with use of some of the available parameters demonstrated to customise the log format and appearance of the log. Further layout and style configuration options, including the addition of chronostratigraphy, sample markers, and other secondary data, are illustrated throughout the paper and other figures. Each of the three logs are direct outputs from stratapy with no subsequent editing.

Ease-of-use has been demonstrated through feedback from a range of researchers who have used stratapy throughout its development. One current user of stratapy notes that 10 logs of 8–10 m thick sedimentary successions, incorporating multiple features and custom lithologies, which would usually take around 3 days to produce using their previous favoured method, can now be produced using stratapy in approximately 30 minutes, with limited coding experience. Log construction time may increase depending on the complexity of the stratigraphic sequence and the volume of data to visualise, however stratapy offers a platform through which the process of construction is simplified and outputs are easily reproducible. In addition, the software is complemented by thorough documentation and its GitHub page, as well as online interactive notebooks which enable users to construct logs without any installation (see ‘Data Availability’).

Automatic amenities

Logs produced in stratapy will automatically produce a structured legend to complement one or more logs within a figure. The legend is split into multiple customisable subcategories for improved interpretation, as illustrated in the figures throughout this work. Lithologies used for units and lenses are ordered from the base to the top of a succession. Minerals and features are also integrated into the legend, with the latter split into sedimentary, palaeontological, or tectonic features; erosional, gradational, or sharp bed contacts between units are also summarised in the legend. In addition to controlling the naming and placement of legend elements, the position and layout of the legend can be easily configured through the parameter-based customisation system, or a standalone legend can also be created to accompany more complex figure plates, or to suit individual needs.

Units placed consecutively within a log will be automatically merged into one ‘combined’ unit, while any minerals, features or lenses within those constituent units will continue to be displayed within that stratum only. This powerful feature not only removes unnecessary bed contacts within uniform strata, which most existing software display, it also allows for more precise grain size changes within strata and controlled placement of features/minerals, enabling more representative and scientifically rigorous digital logs through the accurate portrayal of complex units.

In many cases, existing software use a tabular format to visualise grain size within a log, while others use a fixed grain scale, typically from silts and sands through to gravels and cobbles. While useful in some disciplines, other fields would not find use within these constraints. Multiple grain size presets (e.g., lower right panel, Figure 1) are offered in stratapy which change the labels and positions of the grain size markers: clays, silts, sands, and smaller sand sizes for sedimentologists, as well as tephra, lapilli, and blocks/bombs for volcanologists, for example. We also include grain scales based on the extended Dunham classification23,24 and that of Leighton and Pendexter25 to aid representation of carbonates, as well as a more general sedimentary scale and the ability for users to define their own custom grain size format, if desired.

Curated and bespoke symbology

Geoscientists frequently need to overlay specific minerals, fossil assemblages, or tectonic features, and represent localised lenses of alternating lithology to capture the true heterogeneity of a sequence and to highlight features of particular note. However, existing logging tools often fail this requirement, offering limited, non-standardised patterns that lack the flexibility to handle complex successions, or to be customised by the user. The USGS offers a robust set of standardised patterns which can be integrated into some digital tools, but inconsistent support leads to a lack of visual consistency across the community. While existing standards cannot be completely exhaustive, they often neglect particular disciplines like volcanology, leaving researchers to adapt other lithologies, or create logs manually. This lack of a comprehensive, standardised, and extensible digital symbology limits the ability of geologists to create truly precise and universally readable stratigraphic logs.

In addition to making all black-and-white USGS lithologies and patterns26,27 available for use by default in stratapy, coloured versions of each lithology have also been provided based on common usage within the community. Furthermore, additional patterns have been curated to build on the USGS collection, adding commonly used patterns like mudstone to the default library. This extensive collection of over 200 patterns should provide sufficient utility for all researchers, however, stratapy also enables customisation of every pattern to allow ultimate flexibility for the user. Each lithological pattern can be adjusted to change the background colour or legend display name, while custom images can also be uploaded for use, if desired. Moreover, single-colour fills are also available to illustrate soils or other unit types. This customisation feature enables any lithology to be represented (whether as a unit or lens) using stratapy. Such a standardised offering is intended to provide a strong data library for the community, and for possible future artificial intelligence or machine learning applications.

The same is true for minerals and features; a bespoke set of more than 75 palaeontological, sedimentary, and tectonic features are built into stratapy, in addition to a range of commonly used minerals. These features cover a wide range of disciplines and research-interests and have been designed with more detail and consistency than many existing collections. These assets can also be configured to individual needs, whether through using custom images, renaming features, or moving them between sections of the legend. Minerals can similarly be added as required, or existing mineral styles can be edited in colour and shape, as illustrated in the lower middle panel of Figure 1. These vast customisation options ensure that all users, regardless of discipline, research interests, or field-specific constraints, will be able to accurately and professionally represent their observations with a common palette of lithologies, minerals, and features.

Discussion

The previous sections have outlined the architectural principles and technical goals of stratapy. The following use cases demonstrate its practical utility using published datasets from the fields of sedimentology, volcanology, and palaeontology and geochemistry, as well as industrial applications. The remaining figures in this paper are direct outputs from Python using stratapy, with no subsequent editing.

Sedimentology

Figure 4 presents a composite stratigraphic column summarising the key geological units from the circum-sedimentary cover of the Troodos ophiolite in southern Cyprus (Eastern Mediterranean), recording a succession from the Upper Cretaceous to the Quaternary. It demonstrates key functionalities and the basic principles of log construction using stratapy, including customising lithologies, excluding the grain axes by implementing the ‘log’ layout setting, and the relabelling of units for the legend.

Fig. 4.

Fig. 4

A stratigraphic log illustrating the depositional history of southern Cyprus, created with a customised style and automated legend. Recreated from46 using stratapy with no additional editing.

Figure 5 complements the composite log using three sedimentary logs, presented side-by-side, illustrating sedimentary units within the Messinian, Pliocene, and Pleistocene deposits of southern Cyprus extracted from the section in Figure 4. The detailed sedimentary logs in this figure are constructed from additional sources to feature some of the basic capabilities of stratapy2,28,29. This figure is created using a single line of code in stratapy, which plots each log on its own height axis, with harmonised symbology and a shared legend enabling direct comparison of lithologies, bed thickness, and key contacts while preserving local scale. As demonstrated, stratapy’s single-line multi-figure functionality is used to plot many files in a 1D or 2D grid with a complementary legend and optional alignment of the abscissa and ordinate axes. Additional customisation through renaming existing lithologies and features, as described in previous sections, have also been used to create these logs.

Fig. 5.

Fig. 5

Sedimentary logs plotted side-by-side illustrating sequences from the Messinian (left), Pliocene (middle), and Pleistocene (right), as shown in Figure 4. Figures recreated from2,28,29 using stratapy with no additional editing.

Where additional cartographic elements or bespoke annotations are desired, stratapy figures can be extended (e.g., adding text labels with Matplotlib) or exported to layered SVG/PDF files for light vector editing. Additional data-driven elements like chronostratigraphy, sample markers, or a twin y-axis (see Figure 1), can each be added with stratapy with one additional line of code. With sedimentary logs often shown in groups as collected from field localities, Figure 5 illustrates the advantages of automating the construction of such figures which can drastically reduce the amount of time in visualising one’s observations.

Palaeontology and geochemistry

Logs may also be presented alongside other datasets in a composite figure, such as geochemical and fossil occurrence data, or chronostratigraphy and rock formations. Palaeontologists and geochemists studying deep time typically make use of such figures, logging broad lithological changes and correlating them with sea level and bulk lithofacies changes, and presenting multiple datasets. Using stratapy, users have the ability to produce a log that can be customised by automatically integrating chronostratigraphy, as well as a range of sedimentological and palaeontological features, or complemented with multiple axes of auxiliary data. Other frequently used features by researchers in this field are available, such as trend glyphs to denote temporal trends (e.g., coarsening-/fining-upward or shallowing-/deepening-upward).

The example provided in Figure 6 shows a sedimentary succession through the late Neoproterozoic of Namibia30. The replicated log is produced with three lines of code, with additional features, including fossil occurrences and a radioisotope geochronology date, also added through stratapy’s customisation options. The log is then integrated with four additional data panels for regional formation subdivisions and geochemical data using Matplotlib (Figure 6).

Fig. 6.

Fig. 6

Stratigraphic log with accompanying geochemical data for carbonate rocks from the Kuibis Subgroup of the Nama Group. Recreated from30 using stratapy and Matplotlib with no additional editing.

Volcanology & tephra

In tephrochronology, logs describe tephra layers, sometimes labelled with facies information, radioisotope dating results, thicknesses, and other characteristics31. In other cases, the location of samples, photographs, or other features are indicated in a sequence combined with other lithological observations32.

Using stratapy, we are able to display aligned, side-by-side correlated logs to allow for stratigraphic or temporal correlation, enabling users to automatically visualise logs from numerous files with ease. Figure 7 uses correlated logs to illustrate the preservation of large magnitude tephra falls offshore the Bay of Plenty, North Island, New Zealand. This figure indicates the presence and thickness of tephra layers, without any lithological patterns or unit borders, however, custom volcanological patterns are also available by default, if desired. In this case, stratapy has also been configured to produce the figure without a legend to enable manual reference to relevant features, with a key for tephra units created instead.

Fig. 7.

Fig. 7

Aligned stratigraphic columns of cores indicating the presence (navy) of tephra layers, as well as regions of sediment separation in the coring barrel (beige). Tephra layers are annotated with their depth at the layer base and their identification. Figure produced by stratapy, recreating Figure 2 from31 with no additional editing.

Applied geoscience: energy, resources, and infrastructure

In industry, correlated borehole data may be displayed in a similar way to the above volcanological datasets. Figure 8 represents a stratapy-reproduced figure from the British Geological Survey’s UK Geoenergy Observatories (UKGEOS) project which assesses mine-water thermal energy storage33,34. In this case, several borehole datasets are presented side-by-side in a single figure. The correlated logs are produced with just one line of code, which automatically aligns the boreholes, compiles a legend, and provides a single, shared axis. Additionally, logs can be manually offset to account for subject- or site-specific requirements.

Fig. 8.

Fig. 8

Seven vertically aligned borehole logs (approx. 45 m) from the UKGEOS project’s Glasgow observatory45 produced by stratapy with no additional editing.

These borehole array data demonstrate that understanding complex processes below ground - whether thermal, or otherwise - requires a unified visual synthesis of the subsurface. By correlating stratigraphic markers across multiple research compounds, engineers and researchers can delineate the continuity of geological units and validate numerical models.

Educational value

Undergraduate students are commonly taught to hand-draw stratigraphic logs either by recording observations in the field, or completing handouts in a classroom, but the subsequent digitisation of these records is frequently overlooked. Our package offers a new and interactive approach to introducing students to lithostratigraphy and sedimentology, as well as chronostratigraphy, biostratigraphy, and geochemistry.

As modern teaching is increasingly digitised35,36, including the uptake of programming languages like Python within geoscience curricula, stratapy offers a simple and intuitive framework through which students can construct their own stratigraphic logs computationally. Rather than treating logs as static, hand-drawn outputs, students can experiment dynamically: adjusting lithological parameters, modifying scale and thickness, exploring symbol conventions, and observing how these changes influence the visual and interpretative structure of a log. At the same time, the transition from analogue field notebooks to structured, digital data formats is a crucial skill in modern industry, helping students develop skills in computational thinking, reproducibility, and integrated geological analysis.

Conclusion

We have created stratapy to be a free and open source, easy-to-use Python package for the digitisation of stratigraphic logs, which has applications in all fields of the Earth sciences. Its simple functionality, which requires only a few lines of code, makes it an ideal tool for those wanting to construct figures with limited coding experience and/or time. Our software can create single logs, multi-log figures, and integrates into the wider Python ecosystem for ultimate flexibility for the user. The highly customisable nature of stratapy, from the hundreds of available lithologies and features, to automatic utilities like legend generation, automatic chronostratigraphy, and adding secondary data, makes it a more comprehensive and flexible open source alternative to existing tools, as illustrated in Table 1. Although stratapy may not be able to appeal to those who use highly non-standard logging conventions, we have demonstrated that this tool offers a wider range of functionality than existing tools. Customisation of logs to meet a wide range of disciplines and research aims through a simple parameter-based mechanism ensures that stratapy is accessible to all, while producing professional, high-quality figures for those in academia, industry, and the wider community.

As the Earth sciences becomes more digitally-literate, the use of a coding language such as Python for the analysis and presentation of data is becoming more routine and beneficial. Indeed, as universities add digital/computational skills courses to the curriculum, stratapy has the potential to not only be a valuable professional tool, but also a valuable teaching tool. It is hoped that stratapy will promote reproducibility within the logging and geoscience community, as well as encourage consistency between academia, industry and the various disciplines within. The package’s built-in collections of lithological patterns, features and minerals, in addition to its vast customisation options enables data from all areas of the Earth sciences to benefit and find use in this standardised tool.

Methods

Stratapy was built in Python, widely considered one of the most general-purpose, high-level, and easiest-to-use programming languages, combined with an array of existing packages22,37–41. The software ingests data of tabular format with a range of geological parameters and constructs a stratigraphic log on a bed-by-bed basis. Input files (CSV/Excel/JSON) are read with pandas and normalised to a canonical DataFrame with one row per bed. The parser validates column data and types, suggesting possible solutions for incorrectly formatted inputs, enforces monotonic sequencing, and standardises categorical values. Each log is represented by a LogObject class which constructs an ordered collection of bed records and orchestrates a rendering pipeline: bed boundaries and polygons are computed in data coordinates; lithological fills are applied via a pattern registry; optional mineralogy and bed-scale features are drawn, followed by contacts and outlines. Lithological patterns were adapted from Daven Quinn’s modern formatting of the Federal Geographic Data Committee (FGDC) Digital Cartographic Standard for Geologic Map Symbolisation26,27, while sedimentary, palaeontological, and tectonic features were created by the authors. All are stored and loaded as PNG images. Legends are generated automatically by collecting unique pattern/feature keys from the plotted artists and passing de-duplicated handles and labels to matplotlib’s legend constructor while accounting for ordering, labels, and visibility in line with user preferences. For correlated or multi-panel figures, a MultiLogObject class builds each log independently and then links them by sharing a common axis where desired and unifying scales, offsets, and legends via matplotlib and custom utilities. All plotting functions accept an existing matplotlib axis and return the Axes and artist handles to facilitate downstream customisation.

The package includes a full suite of unit and integration tests implemented using pytest42 which cover basic functionality, input-validation checks and ecosystem compatibility. Compatibility across Python versions and dependency ecosystems was systematically validated using nox43, which executed the test suite against multiple Python releases as well as current and previous versions of key dependencies. A full compatibility matrix is available in the GitHub README. Continuous integration via GitHub Actions ensures that all tests are automatically executed on every code change.

Acknowledgements

The authors would like to thank Dr Alastair Hodgetts for his valuable conversations on stratigraphy, particularly in the context of volcanology, which significantly improved the software’s applicability to such fields. We also thank Dr Fred Bowyer and Dr Alan Hastie for their helpful comments on the manuscript.

Author contributions

JLS conceived the software, designed the architecture and implemented the core package; CA and RA contributed to design decisions and implementation planning. CA led testing and helped refine functionality; JLS carried out packaging, release engineering and documentation. All authors wrote the manuscript.

Funding

This work was supported by the UK Natural Environmental Research Council (NERC) E4 DTP, grant number NE/S007407/1 (CA, RA).

Data availability

stratapy is released under the 3-Clause BSD Licence and can be installed using the pip package installer: pip install stratapy, or accessed through GitHub at https://github.com/Jack6228/stratapy. The latest version of stratapy can always be found at the DOI in reference 44. Full documentation, including installation, tutorials, and a gallery of examples, can be found at https://stratapy.readthedocs.io/en/latest/, or through the GitHub and Zenodo links above. A Python notebook to recreate the figures in this paper can also be found in the above GitHub repository, but alternatively can be accessed and run immediately online, without any installation, using this Google Colab notebook: https://colab.research.google.com/github/Jack6228/stratapy/blob/master/examples/ManuscriptFigures.ipynb. An additional tutorial notebook can also be accessed: https://colab.research.google.com/github/Jack6228/stratapy/blob/master/examples/Tutorial.ipynb.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Miall, A. D. & Stratigraphy,. The Modern Synthesis (Springer International Publishing, 2022) (2 edn).
  • 2.Antoniou, C. & Robertson, A. H. F. Middle-Late Pleistocene to Holocene sediments of the Tremithos River and related shallow-marine to non-marine coastal deposits in SE Cyprus: Products of inter-related surface uplift and glacio-eustatic controlled sea-level change. Sediment. Geol.486, 106900. 10.1016/j.sedgeo.2025.106900 (2025). [DOI] [Google Scholar]
  • 3.Forman, S. L., Wu, Z., Wiest, L., Marin, L. & Mayhack, C. Late Quaternary fluvial and aeolian depositional environments for the western Red River, Southern Great Plains. USA. Quat. Res.115, 3–24. 10.1017/qua.2023.15 (2023). [DOI] [Google Scholar]
  • 4.Whitfield, R. G. et al. The nature, timing and controls of the Quaternary development of the Rio Bergantes, Ebro basin, northeast Spain. Geomorphology196, 106–121. 10.1016/j.geomorph.2012.04.014 (2013). [DOI] [Google Scholar]
  • 5.Zecchin, M., Nalin, R. & Roda, C. Raised Pleistocene marine terraces of the Crotone peninsula (Calabria, southern Italy): facies analysis and organization of their deposits. Sediment. Geol.172, 165–185. 10.1016/j.sedgeo.2004.08.003 (2004). [DOI] [Google Scholar]
  • 6.Timms, N. E. et al. Sedimentary facies analysis, mineralogy and diagenesis of the Mesozoic aquifers of the central Perth Basin. Western Australia. Mar. Pet. Geol.60, 54–78. 10.1016/j.marpetgeo.2014.08.024 (2015). [DOI] [Google Scholar]
  • 7.Erlström, M. & Sopher, D. Geophysical well log-motifs, lithology, stratigraphical aspects and correlation of the Ordovician succession in the Swedish part of the Baltic Basin. Int. J. Earth Sci.108, 1387–1407. 10.1007/s00531-019-01712-y (2019). [DOI] [Google Scholar]
  • 8.Brennan, D. T., Pearson, D. M., Link, P. K. & Chamberlain, K. R. Neoproterozoic Windermere Supergroup Near Bayhorse, Idaho: Late-Stage Rodinian Rifting Was Deflected West Around the Belt Basin. Tectonics39, e2020TC006145. 10.1029/2020tc006145 (2020). [DOI] [Google Scholar]
  • 9.Sardar Abadi, M. et al. Predicting the presence of tephra layers in lacustrine deposits using spectral gamma ray data: An example from Lake Chalco. Mexico City. PLoS ONE19, e0315331. 10.1371/journal.pone.0315331 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.de León, A. C. et al. A history of violence: magma incubation, timing and tephra distribution of the Los Chocoyos supereruption (Atitlán Caldera, Guatemala). J. Quat. Sci.36, 169–179. 10.1002/jqs.3265 (2021). [DOI] [Google Scholar]
  • 11.Carrasco-Núñez, G., López-Martínez, M., Hernández, J. & Vargas, V. Subsurface stratigraphy and its correlation with the surficial geology at Los Humeros geothermal field, eastern Trans-Mexican Volcanic Belt. Geothermics67, 1–17. 10.1016/j.geothermics.2017.01.001 (2017). [DOI] [Google Scholar]
  • 12.Didi, C. N., Osinowo, O. O., Akpunonu, O. E. & Okeke, S. E. Multi-disciplinary approach to evaluate hydrocarbon potential in the Bornu Basin. Northeastern Nigeria. J. Afr. Earth Sci230, 105742. 10.1016/j.jafrearsci.2025.105742 (2025). [DOI] [Google Scholar]
  • 13.Jonk, R., Bohacs, K. M. & Davis, J. S. Evaluating Top Seals within a Sequence-Stratigraphic Framework: Impact on Geological Carbon Sequestration. Mar. Pet. Geol.146, 105920. 10.1016/j.marpetgeo.2022.105920 (2022). [DOI] [Google Scholar]
  • 14.Heinemann, N. et al. Hydrogen storage in porous geological formations - onshore play opportunities in the midland valley (Scotland, UK). Int. J. Hydrogen Energy.43, 20861–20874. 10.1016/j.ijhydene.2018.09.149 (2018). [DOI] [Google Scholar]
  • 15.Alexander, R. D. et al. Low oxygen but dynamic marine redox conditions permitted the Cambrian Radiation. Sci. Adv.11, eads2846. 10.1126/sciadv.ads2846 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Li, S. et al. Magnetostratigraphy of the Niubao Formation in the Bangong-Nujiang Suture Zone: Constraints on the Amount of Crustal Shortening of the Tibetan Plateau Since 60 Ma. Geophys. Res. Lett.51, e2024GL111729. 10.1029/2024gl111729 (2024). [DOI] [Google Scholar]
  • 17.Caricchi, C. et al. Paleomagnetism and rock magnetism from sediments along a continental shelf-to-slope transect in the NW Barents Sea: Implications for geomagnetic and depositional changes during the past 15 thousand years. Glob. Planet. Change160, 10–27. 10.1016/j.gloplacha.2017.11.007 (2018). [DOI] [Google Scholar]
  • 18.Zervas, D. et al. SedLog: A shareware program for drawing graphic logs and log data manipulation. Comput. Geosci.35, 2151–2159. 10.1016/j.cageo.2009.02.009 (2009). [DOI] [Google Scholar]
  • 19.Reed, J. A. The Paleontological Stratigraphic Interval Construction and Analysis Tool (Iowa State University, 2007) (Ph.D. thesis).
  • 20.Jobe, Z. R. et al. Sedimentary graphic logs: a template for description and a toolkit for digitalization. Sediment. Rec.19, 15–29. 10.2110/sedred.2021.3.3 (2021). [DOI] [Google Scholar]
  • 21.Merlino, R. Stratilib. GitHub https://github.com/rubensdmp/StratiLib (2022). Accessed 1 March 2026.
  • 22.Hunter, J. D. Matplotlib: A 2D Graphics Environment. Comput. Sci. Eng.9, 90–95. 10.1109/mcse.2007.55 (2007). [DOI] [Google Scholar]
  • 23.Dunham, R. J. Classification of carbonate rocks according to depositional texture. In Classification of Carbonate Rocks - A Symposium 10.1306/M1357 (American Association of Petroleum Geologists, 1962) [DOI]
  • 24.Embry, A. F. & Klovan, J. E. A late Devonian reef tract on northeastern Banks Island, NWT. Bull. Can. Pet. Geol.19, 730–781. 10.35767/gscpgbull.19.4.730 (1971). [DOI] [Google Scholar]
  • 25.Leighton, M. W. & Pendexter, C. Carbonate Rock Types. In Classification of Carbonate Rocks - A Symposium 10.1306/M1357 (American Association of Petroleum Geologists) (1962). [DOI]
  • 26.U.S. Geological Survey. FGDC Digital Cartographic Standard for Geologic Map Symbolization (PostScript Implementation): U.S. Geological Survey Techniques and Methods 11-A2. http://pubs.usgs.gov/tm/2006/11A02/ (2006).
  • 27.Quinn, D. FGDC Geologic Patterns for the Web. GitHub https://github.com/davenquinn/geologic-patterns (2017). accessed 3 2026.
  • 28.Balmer, E. M., Robertson, A. H. F., Raffi, I. & Kroon, D. Pliocene-Pleistocene sedimentary development of the syntectonic Polis graben, NW Cyprus: evidence from facies analysis, nannofossil biochronology and strontium isotope dating. Geol. Mag.156, 889–917. 10.1017/s0016756818000286 (2019). [DOI] [Google Scholar]
  • 29.Palamakumbura, R. N. & Robertson, A. H. F. Pliocene-Pleistocene sedimentary-tectonic development of the Mesaoria (Mesarya) Basin in an incipient, diachronous collisional setting: facies evidence from the north of Cyprus. Geol. Mag.155, 997–1022. 10.1017/s0016756816001072 (2018). [DOI] [Google Scholar]
  • 30.Tostevin, R. et al. Uranium isotope evidence for an expansion of anoxia in terminal Ediacaran oceans. Earth Planet. Sci. Lett.506, 104–112. 10.1016/j.epsl.2018.10.045 (2019). [DOI] [Google Scholar]
  • 31.Shane, P., Sikes, E. L. & Guilderson, T. P. Tephra beds in deep-sea cores off northern New Zealand: Implications for the history of Taupo Volcanic Zone, Mayor Island and White Island volcanoes. J. Volcanol. Geotherm. Res.154, 276–290. 10.1016/j.jvolgeores.2006.03.021 (2006). [DOI] [Google Scholar]
  • 32.Dugmore, A. J., Newton, A. J., Larsen, G. & Cook, G. T. Tephrochronology, environmental change and the Norse settlement of Iceland. Environ. Archaeol.5, 21–34. 10.1179/env.2000.5.1.21 (2000). [DOI] [Google Scholar]
  • 33.Gonzalez Quiros, A. et al. De-risking green energy from mine waters by developing a robust hydrogeological conceptual model of the UK Geoenergy Observatory in Glasgow. Hydrogeol. J. 32, 1307–1329, 10.1007/s10040-024-02778-y (2024). [DOI]
  • 34.Monaghan, A. A. et al. Drilling into mines for heat: geological synthesis of the UK Geoenergy Observatory in Glasgow and implications for mine water heat resources. Q. J. Eng. Geol. Hydrogeol. 10.1144/qjegh2021-033 (2022). [DOI] [Google Scholar]
  • 35.Pugsley, J. H. et al. Quantifying Virtual Field Trip Efficiency. J. Photogramm. Remote Sens. Geoinf. Sci.92, 679–690. 10.1007/s41064-024-00321-y (2024). [DOI] [Google Scholar]
  • 36.Bond, C. E. & Cawood, A. J. A role for virtual outcrop models in blended learning - Improved 3D thinking and positive perceptions of learning. Geosci. Commun.4, 233–244. 10.5194/gc-4-233-2021 (2021). [DOI] [Google Scholar]
  • 37.Harris, C. R. et al. Array programming with NumPy. Nature585, 357–362. 10.1038/s41586-020-2649-2 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.The pandas Development Team. pandas – Python Data Analysis Library, 10.5281/zenodo.17992932 (2025). [DOI]
  • 39.McKinney, W. Data structures for statistical computing in Python. Proceedings of the 21st Python in Science Conference 10.25080/Majora-92bf1922-00a (2010). [DOI] [Google Scholar]
  • 40.Gillies, S. et al. Shapely 10.5281/zenodo.17193310 (2025). [DOI] [Google Scholar]
  • 41.Virtanen, P. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat. Methods17, 261–272. 10.1038/s41592-019-0686-2 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Krekel, H. et al. pytest (2025). Python testing framework.
  • 43.Davis, A. J. J. et al. nox (2025). Flexible test automation for Python.
  • 44.Smith, J. L., Antoniou, C. & Alexander, R. stratapy: A tool for automated stratigraphic log visualisation, 10.5281/zenodo.19320521 (2026). [DOI] [PMC free article] [PubMed]
  • 45.British Geological Survey. UK Geoenergy Observatories data. https://ukgeos.ac.uk/data-downloads. Accessed 22 February 2026.
  • 46.Papadimitriou, N. et al. The tectonostratigraphic evolution of Cenozoic basins of the Northern Tethys: The Northern margin of the Levant Basin. Oil Gas Sci. Technol.73, 77. 10.2516/ogst/2018085 (2018). [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

stratapy is released under the 3-Clause BSD Licence and can be installed using the pip package installer: pip install stratapy, or accessed through GitHub at https://github.com/Jack6228/stratapy. The latest version of stratapy can always be found at the DOI in reference 44. Full documentation, including installation, tutorials, and a gallery of examples, can be found at https://stratapy.readthedocs.io/en/latest/, or through the GitHub and Zenodo links above. A Python notebook to recreate the figures in this paper can also be found in the above GitHub repository, but alternatively can be accessed and run immediately online, without any installation, using this Google Colab notebook: https://colab.research.google.com/github/Jack6228/stratapy/blob/master/examples/ManuscriptFigures.ipynb. An additional tutorial notebook can also be accessed: https://colab.research.google.com/github/Jack6228/stratapy/blob/master/examples/Tutorial.ipynb.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES