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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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