Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yori Fournier
myplotlib
Commits
e3b890d7
Commit
e3b890d7
authored
Feb 05, 2018
by
Philipp Gast
Browse files
added a plot routine to the client side - now something can be seen :-)
parent
e29e7c0a
Pipeline
#399
failed with stage
in 1 minute and 35 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mplClient2.py
View file @
e3b890d7
...
...
@@ -195,9 +195,6 @@ class MplClient2():
print
(
'instead if answer a error was received'
)
datas
=
(
None
,)
else
:
status
=
self
.
send
(
Signal
(
True
,
'Answer received'
))
if
status
:
rt
=
self
.
waitForSignal
()
# set the figure data to answerSig.value
datas
=
formatedData
.
content
return
datas
mplServer2.py
View file @
e3b890d7
...
...
@@ -118,19 +118,7 @@ class MplHandler(SocketServer.StreamRequestHandler):
# datas.append(ax.packFormattedData(ax.data))
datas
=
datas
+
(
ax
.
data
,)
answer
=
Answer
(
datas
)
# Send the packed Formatted data
status
=
self
.
send
(
answer
)
# If failed
if
not
status
:
print
(
'sending answer to request SYNCFIGFORMATRAWDATA failed'
)
# Wait for the client receipt
status
=
self
.
waitForReceipt
(
conn
)
return
Status
(
True
,
'round trip complet'
)
return
Answer
(
datas
)
def
send
(
self
,
sig
):
# pickel the signal
...
...
test/network/clientside/axTest.py
View file @
e3b890d7
...
...
@@ -80,3 +80,19 @@ class AxTest(MyAxes):
print
(
DBUG
+
'I formatted the raw data!'
)
return
(
True
)
def
plotting
(
self
):
xRange
=
self
.
keywords
.
get
(
'xRange'
)
yRange
=
self
.
keywords
.
get
(
'yRange'
)
try
:
self
.
plot
(
self
.
data
[
'xdata'
],
self
.
data
[
'ydata'
])
except
KeyError
:
print
(
SEVR
+
'The formatting of the data was apparently wrong. --> EXIT'
)
return
(
False
)
if
(
xRange
):
self
.
set_xlim
(
xRange
)
if
(
yRange
):
self
.
set_ylim
(
yRange
)
return
(
True
)
test/network/test_com.py
View file @
e3b890d7
import
threading
from
time
import
sleep
from
serverside.myIOs
import
readStupidData
from
serverside.figTest
import
FigTest
as
FigTests
...
...
@@ -26,3 +27,4 @@ client.connect(('', 50803))
client
.
readData
(
'readStupidData'
,
'data1'
)
fig
=
client
.
newSyncFigure
(
FigTestc
,
(
'data1'
,))
win
=
mpl_client
.
MyWin
(
fig
)
sleep
(
10
)
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