Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
santiago_ortiz
Frequent Visitor

Differences in well-log plotting between Jupyter Notebook and Power BI

I'm using python visuals for plotting 2 columns (DEPTH and GR) of a Well-Log dataset in a "vertical line chart".

 

The target chart looks like this:

santiago_ortiz_0-1681943571674.png

 

The Python script in jupyter notebook is pretty simple:

 

import lasio
file_path = "Well-Logs-and-Petrophysics/Data/15-9-19_SR_COMP.LAS"
las = lasio.read(file_path)
df = las.df()
df.reset_index(drop=False, inplace=True)
df.rename(columns={'index': 'Index', 'DEPT':'DEPTH'}, inplace=True)
df.dropna(how='any', axis=0, inplace=True)

x = df['GR']
y = df['DEPTH']
plt.plot(x, y)

 

 

For loading the data into Power BI, I'm using the same firsts lines to read (and clean) the LAS file as a dataframe.

 

Finally, I'm using the using the following code for the python visual:

 

import matplotlib.pyplot as plt 

dataset.plot(kind='line', x='GR', y='DEPTH')
plt.show()

 

 

But the image plotted is the following:

santiago_ortiz_2-1681944116200.png

Summary:

The python script is the same as in jupyter notebook, than in power bi, but power BI is not plotting the same way.

 

Question:

What is happening, and how to achieve desired well-log visualization in Power BI using Python visuals

0 REPLIES 0

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.