Subsurface Syntax

Subsurface Syntax

Enhancing Visualization of Well Logs With Plot Fills

Applying Color Infill to Well Log Data Using matplotlib

Andy McDonald's avatar
Andy McDonald
Jan 27, 2021
∙ Paid

Applying Color Infill to Well Log Data Using matplotlib and fill_betweenx()

Log plot shading using fill_betweenx. [Image Created by Author]

Matplotlib is a great library to work with in Python and it is one that I always go back to time and time again to work with well logs. Due to its high degree of flexibility it can be tricky to get started with it at first, but once you have mastered the basics it can become a powerful tool for data visualization.

When working with well log data it can be common to apply color fills to the data to help quickly identify areas of interest. For example, identifying lithologies or hydrocarbon bearing intervals. Most of the time when I have been searching on the web for ways to achieve a color fill the articles point to filling between a line and the x-axis on a plot. There are significantly fewer results showing how to apply shading to well log plots, which generally have their longest axis along the y dimension, or to the y-axis in general.

This article …

Keep reading with a 7-day free trial

Subscribe to Subsurface Syntax to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2026 Andy McDonald · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture