Tuesday, December 13, 2016

Xplotter - added histograms

The name for Glacier Geosciences came from my wonderful wife.  She was taking my love of outdoors (mountain biking and hiking) and mixing it with business.  The more I thought about it I liked the name.  I, of course, know what glaciers are but I looked up the word.  The definition was something along the lines of "a constant moving force".  I liked that.  It may not always appear that I am doing something but the results are very evident.  

So in this update I'm sharing some eye candy of my first attempt at putting histograms into my cross plot software.  <start shameless brag>  I only worked on it for one two nights.  <end shameless brag>  I'm sure I will change, modify and make it prettier.  There is no great scientific revelations here.  I'm just slowly improving my toolbox.  All of my software has been written in python and uses no extra plugins.  I'm using straight-forward Python 3.5 and Tkinter.  

This first example is just a simple plot of density and gamma ray.  The importance of histrograms are pretty self evident.  You can quickly get the P10, P90 and average from each bi-modal distribution by eye-balling the x-axis for the density curve without having to filter and perform the math.  

The example above is where I have flipped the display axis and made it plot the histrograms on the right and top of the plot window.  The data points are colored by VCLAY increasing from light to dark using my coffee palette.  

Options I've coded in:
  • Display on Top or Bottom, Left or Right
  • Change bin distribution line color and thickness
  • Change color fill for the bins
  • Change number of bins to display

More eye candy with different colors.  

This last example is of three different wells that were filtered to the same interval.  I also pull in tops from my log viewing software automatically.  It is nice to get stats on multiple wells all at once.

It really starts to look good when I add in a chart.  Ooooohhh! Aaaaaahhhh!  On the color filel that time I used Hot Pink (#FF69B4).  I'm actually a fan.  At a company I used to work at they were against "girlie" colors.  I think it was more of a joke than a rule but still funny.  The data points are again colored by VCLAY going from light to dark.  

But in the UMAA / RHOMA plot aboev you can see the need for histograms.  There is a distribution on the x axis that favors values around 10 and 12.  If you were to just look at the data points you would think that 8 had an equal representation.  

I did a quick linear transposition for logarithmic curves.  I will eventually expand it where the bins are within the logarithmic scales.  To complete the Pickett Plot I just need to put the slopes for M and N and have them interactive.  

Last one for eye candy sake and bi-modal distributions are cool.  That color fill is cornflower blue (#6495ED) while the data points are lime green (#32CD32).

Next up:  Getting interactive!  I want to be able to filter to data graphically by clicking around the plot and get reports; depth, well name, etc.  I really want to put in the functionality of the Pickett plot because I am growing tired of drawing the lines manually and putting points into Excel for my M for water saturation.

Thanks for looking!  It has been fun!



  1. Excellent work. We need to get together on several projects currently underway in Oklahoma. I will reach out.

  2. This comment has been removed by a blog administrator.

  3. This comment has been removed by a blog administrator.