Skip to content

Commit 70d1c5a

Browse files
author
Onur R. Bingol
committed
Visualization scripts input files path update
1 parent f410490 commit 70d1c5a

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

visualization/mpl_scatter_wframe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
os.chdir(os.path.dirname(os.path.realpath(__file__)))
2121

2222
# Read surface and control points, @ref: https://stackoverflow.com/a/13550615
23-
cpgrid = np.genfromtxt('ctrlpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
24-
surf = np.genfromtxt('surfpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
23+
cpgrid = np.genfromtxt('../surface/ctrlpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
24+
surf = np.genfromtxt('../surface/surfpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
2525

2626
# Reshape surface points array for plotting, @ref: https://stackoverflow.com/a/21352257
2727
cols = surf['x'].shape[0]

visualization/mpl_wframe_trisurf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
os.chdir(os.path.dirname(os.path.realpath(__file__)))
2323

2424
# Read surface and control points, @ref: https://stackoverflow.com/a/13550615
25-
cpgrid = np.genfromtxt('ctrlpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
26-
surf = np.genfromtxt('surfpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
25+
cpgrid = np.genfromtxt('../surface/ctrlpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
26+
surf = np.genfromtxt('../surface/surfpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
2727

2828
# Arrange control points grid for plotting, @ref: https://stackoverflow.com/a/21352257
2929
cols = cpgrid['x'].shape[0]

visualization/mpl_wframe_wframe.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@
1010
* NumPy v1.13.3
1111
* Matplotlib v2.1.0
1212
"""
13+
import os
1314
import numpy as np
1415
import matplotlib
1516
from mpl_toolkits.mplot3d import Axes3D
1617
import matplotlib.pyplot as plt
1718

19+
# Fix file path
20+
os.chdir(os.path.dirname(os.path.realpath(__file__)))
21+
1822
# Read surface and control points, @ref: https://stackoverflow.com/a/13550615
19-
cpgrid = np.genfromtxt('ctrlpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
20-
surf = np.genfromtxt('surfpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
23+
cpgrid = np.genfromtxt('../surface/ctrlpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
24+
surf = np.genfromtxt('../surface/surfpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
2125

2226
# Arrange control points grid for plotting, @ref: https://stackoverflow.com/a/21352257
2327
Xc = cpgrid['x'].reshape(-1, cpgrid['x'].shape[0])

0 commit comments

Comments
 (0)