Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yori Fournier
mypltemplate
Commits
7de367e4
Commit
7de367e4
authored
Feb 14, 2017
by
Yori 'AGy' Fournier
Browse files
add a plotTemplate in the folder design
parent
875c34f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
7de367e4
...
...
@@ -12,11 +12,14 @@ SPCE = ' > -----: '
DEBUG
=
False
# IMPORT myplotlib MyWin
from
myplotlib
import
MyWin
from
myplotlib
import
MyWin
,
MyData
# IMPORT myplotlib MYTOOL toolbox
from
myplotlib.mytool
import
*
# IMPORT myplotlib DESIGN module
from
myplotlib.design
import
*
# IMPORT USER'S IOs
from
myIOs
import
readRun
from
myIOs
import
readSerie
...
...
design/plotTemplate.py
0 → 100644
View file @
7de367e4
# FigSliceResults =====================================================
<
FigSliceResults
::
addAxes
ratio
=
8.
/
8.
frame
=
[
0.
,
0.
,
1.0
,
1.0
]
self
.
add_axes
(
AxDesign
(
self
,
'AxSliceResults'
,
ratio
,
frame
))
/>
<
FigSliceResults
::
declareKeywords
self
.
FIGSIZE
=
(
8.
,
8.
)
self
.
keywords
=
{
'slice'
:
0
}
/>
# ---------------------------------------------------------------------
# AxSliceResults ======================================================
<
AxSliceResults
::
formatRawData
print
(
" > info-: AxDelay::formatRawData"
)
# Get the data from the rawData
zdata_tmp
=
rawdata
.
data
[
'results'
]
ydata
=
zdata_tmp
[
self
.
fig
.
keywords
[
'slice'
]]
# SET THE FORMATTED DATA -------------------------------------------
self
.
data
=
{
'ydata'
:
ydata
}
/>
# ---------------------------------------------------------------------
<
AxSliceResults
::
plotting
print
(
"> info-: AxSliceResults::plotting"
)
# Get some keywords
yRange
=
self
.
fig
.
keywords
.
get
(
'yrange'
,
None
)
# xlabel, ylabel
xlabel
=
r
"${\rm x}~[{\rm m}]$"
ylabel
=
r
"${\rm z}~[{\rm kg}]$"
self
.
xaxis
.
set_label_text
(
xlabel
)
self
.
yaxis
.
set_label_text
(
ylabel
)
# plot stuff
self
.
plot
(
self
.
data
[
'ydata'
])
if
(
yRange
is
not
None
):
self
.
set_xlim
(
yRange
)
/>
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