WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-11-2022, 12:51 PM
CJaiswal CJaiswal is offline
Registered User
 
Join Date: Mar 2022
Posts: 1
Question Bringing Matplotlib 3d Plot to vizard for VR expereince.

Hi Team,
I am working on a project where I need to bring the matplotlib 3d plot output to vizards to have the VR experience. Any idea how can we achieve it? Below is the code which I want to bring into VR Vizards. Below only creates the plot in 3d visual only as per the matplotlib, No Vizards Vr Environment. Any help would be appreciated.

from sklearn.datasets import load_wine
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
import matplotlib
#matplotlib.use('agg')

import matplotlib.pyplot as plt
winedata = load_wine()
X, y = winedata['data'], winedata['target']
pca = PCA()
pipe = Pipeline([('scaler', StandardScaler()), ('pca', pca)])
Xt = pipe.fit_transform(X)
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
plot = ax.scatter(Xt[:,0], Xt[:,1], c=y)
plt.legend(handles=plot.legend_elements()[0], labels=list(winedata['target_names']))
plt.show()
Reply With Quote
  #2  
Old 02-03-2023, 04:09 PM
sado_rabaudi sado_rabaudi is offline
WorldViz Team Member
 
Join Date: Jul 2016
Posts: 40
Hi,

You can see our documentation on using matplotlib with Vizard, and specifically, the example on plotting real time data here: https://docs.worldviz.com/vizard/lat...ght=matplotlib

Best,
Sado
Reply With Quote
Reply

Tags
3d python plot in vr, matplotlib


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard 7 now available! sado_rabaudi Announcements 0 12-02-2020 11:51 AM
gabor patch - matplotlib vizard problem VirtuallyInsane Vizard 1 12-02-2014 09:57 AM
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 11:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 11:46 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 12:13 PM


All times are GMT -7. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC