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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
boddydan
Frequent Visitor

Python Visual - View 3D model (e.g. stl) using vtkplotlib (or other)

I'm trying to create a python visual of a 3D model (such as a .stl file). I've successfully used some python code to show the visual, however it appears as a new window rather than within my visual.

import vtkplotlib as vpl
from stl.mesh import Mesh
mesh = Mesh.from_file("x.stl")
fig = vpl.figure()
mesh = vpl.mesh_plot(mesh)
vpl.show()

I don't need the visual to be interactive, just a static image, but it's not acting like matplotlib as the show() is creating a new window on top of Power BI. I've tried disabling the interactive element by using 'vpl.show(block=False)', however this still creates a new window for a split second and then terminates the script.

Does anybody know how to avoid the creation of a new window and instead show my graphic within the Power BI visual? Or does anybody know of any open-source alternatives I can use to display a 3D model within Power BI? Thanks.

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi  @boddydan ,

 

Currently Power bi only supports below Packages from Python:

Package Version Link
matplotlib 3.2.1 https://pypi.org/project/matplotlib
numpy 1.18.4 https://pypi.org/project/numpy
pandas 1.0.1 https://pypi.org/project/pandas
scikit-learn 0.23.0 https://pypi.org/project/scikit-learn
scipy 1.4.1 https://pypi.org/project/scipy
seaborn 0.10.1 https://pypi.org/project/seaborn
statsmodels 0.11.1 https://pypi.org/project/statsmodels
xgboost 1.1.0 https://pypi.org/project/xgboost

 

For reference,pls see below:

https://docs.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi  @boddydan ,

 

Currently Power bi only supports below Packages from Python:

Package Version Link
matplotlib 3.2.1 https://pypi.org/project/matplotlib
numpy 1.18.4 https://pypi.org/project/numpy
pandas 1.0.1 https://pypi.org/project/pandas
scikit-learn 0.23.0 https://pypi.org/project/scikit-learn
scipy 1.4.1 https://pypi.org/project/scipy
seaborn 0.10.1 https://pypi.org/project/seaborn
statsmodels 0.11.1 https://pypi.org/project/statsmodels
xgboost 1.1.0 https://pypi.org/project/xgboost

 

For reference,pls see below:

https://docs.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.