Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
Water Level Detector
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22J-64
Water Level
Water Level Detector
Commits
79574318
Commit
79574318
authored
Apr 29, 2022
by
Rajasingam kokilan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
read
parent
3bc0126e
Pipeline
#5589
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
read.py
read.py
+31
-0
No files found.
read.py
0 → 100644
View file @
79574318
import
matplotlib.pyplot
as
plt
import
matplotlib.animation
as
animation
import
numpy
as
np
import
time
fig
=
plt
.
figure
()
def
animate
(
i
):
pullData
=
open
(
"text.txt"
,
"r"
)
.
read
()
dataArray
=
pullData
.
split
(
'
\n
'
)
xar
=
[]
yar
=
[]
for
eachLine
in
dataArray
:
if
len
(
eachLine
)
>
1
:
x
,
y
=
eachLine
.
split
(
','
)
xar
.
append
(
float
(
x
))
yar
.
append
(
float
(
y
))
mur
=
plt
.
plot
(
xar
,
yar
)
y_corr
=
np
.
correlate
(
yar
,
yar
,
mode
=
'full'
)
plt
.
subplot
(
2
,
1
,
1
)
plt
.
stem
(
xar
,
yar
)
plt
.
title
(
'Actual Graph'
)
plt
.
subplot
(
2
,
1
,
2
)
plt
.
stem
(
y_corr
,
maxlags
=
11
)
plt
.
title
(
'Correlated Distance'
)
ani
=
animation
.
FuncAnimation
(
fig
,
animate
,
interval
=
1000
)
plt
.
show
()
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