Commit 3d454dd8 authored by Yori Fournier's avatar Yori Fournier
Browse files

Merge branch 'addDesignTemplate' into 'master'

add a plotTemplate in the folder design

See merge request !1
parents 875c34f7 7de367e4
...@@ -12,11 +12,14 @@ SPCE = ' > -----: ' ...@@ -12,11 +12,14 @@ SPCE = ' > -----: '
DEBUG = False DEBUG = False
# IMPORT myplotlib MyWin # IMPORT myplotlib MyWin
from myplotlib import MyWin from myplotlib import MyWin, MyData
# IMPORT myplotlib MYTOOL toolbox # IMPORT myplotlib MYTOOL toolbox
from myplotlib.mytool import * from myplotlib.mytool import *
# IMPORT myplotlib DESIGN module
from myplotlib.design import *
# IMPORT USER'S IOs # IMPORT USER'S IOs
from myIOs import readRun from myIOs import readRun
from myIOs import readSerie from myIOs import readSerie
......
# 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)
/>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment