Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SpartanBots
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roshan Rabinarayan
SpartanBots
Commits
d0f6d35c
Commit
d0f6d35c
authored
Sep 19, 2020
by
Samarth Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing pandas from q3
parent
a1b27e17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
q3/q3.py
q3/q3.py
+12
-6
No files found.
q3/q3.py
View file @
d0f6d35c
import
numpy
as
np
import
matplotlib.pyplot
as
plt
from
mpl_toolkits
import
mplot3d
import
pandas
as
pd
from
pylab
import
*
import
csv
from
pylab
import
colorbar
fig
=
plt
.
figure
(
figsize
=
(
12
,
12
))
ax
=
plt
.
axes
(
projection
=
'3d'
)
x_points
,
y_points
,
z_points
=
np
.
genfromtxt
(
'csv_file'
,
delimiter
=
','
,
unpack
=
True
)
"""
x_axis=pd.read_csv("csv_file",names=['x','y','z'],usecols=['x'])
x_points
=
x_axis
.
to_numpy
()
y_axis=pd.read_csv("csv_file",names=['x','y','z'],usecols=['y'])
y_points
=
y_axis
.
to_numpy
()
z_axis=pd.read_csv("csv_file",names=['x','y','z'],usecols=['z'])
z_points
=
z_axis
.
to_numpy
()
x_points=x_axis.to_numpy()
y_points=y_axis.to_numpy()
z_points=z_axis.to_numpy()"""
graph
=
ax
.
scatter3D
(
x_points
,
y_points
,
z_points
,
c
=
z_points
,
cmap
=
'coolwarm'
)
colorbar
(
graph
,
shrink
=
0.5
)
ax
.
set_xlabel
(
'X axis'
,
fontweight
=
'bold'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment