Python APIs for Horizon Histogram Window Contextual Actions

Getting Started

In order to define a contextual action for horizon histogram windows, you need to put your Python script in your Python directory under a directory called Contextual_Histogram_Horizon_Window.

Go to Tools->Options->Environment->Python Scripts (or Tools->Options->Python->Scripts in INTViewer 5.2) and click "Refresh from Disk". Your script should be listed automatically.

You will now be able to execute this script from the contextual menu of the horizon histogram window:

This script will find the smallest number of bars in a layer within the window, and set all layers in the window to use that many bars.

This script is attached to the bottom of this article.

The result after the script executes should look something like the following.