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
5ea59557
Commit
5ea59557
authored
Sep 16, 2020
by
Sanchit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uploading solution of q3
parent
247cc558
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
q3/q3.py
q3/q3.py
+24
-0
q3/q3plot.jpg
q3/q3plot.jpg
+0
-0
No files found.
q3/q3.py
View file @
5ea59557
import
numpy
as
np
import
matplotlib.pyplot
as
plt
from
mpl_toolkits
import
mplot3d
import
pandas
as
pd
from
pylab
import
*
fig
=
plt
.
figure
(
figsize
=
(
12
,
12
))
ax
=
plt
.
axes
(
projection
=
'3d'
)
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
()
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'
)
ax
.
set_ylabel
(
'Y axis'
,
fontweight
=
'bold'
)
ax
.
set_zlabel
(
'Z axis'
,
fontweight
=
'bold'
)
ax
.
grid
(
False
)
ax
.
w_xaxis
.
set_pane_color
((
0.0
,
0.0
,
0.0
,
0.0
))
ax
.
w_yaxis
.
set_pane_color
((
0.0
,
0.0
,
0.0
,
0.0
))
ax
.
w_zaxis
.
set_pane_color
((
0.0
,
0.0
,
0.0
,
0.0
))
fig
.
savefig
(
'q3plot.jpg'
,
bbox_inches
=
'tight'
)
q3/q3plot.jpg
0 → 100644
View file @
5ea59557
91 KB
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