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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.