Commit 6cad3c49 authored by Yori Fournier's avatar Yori Fournier
Browse files

Now tutorials of localhost passes too

parent bcccd881
Pipeline #489 failed with stage
in 5 minutes and 46 seconds
from .myData import MyData
from .mpl_data import MplData
# TECHNICAL ------------------------------------------------------------
D_VERSION='v5'
......@@ -19,7 +19,7 @@ D_FIGNUM = 0 # default figure number
D_FIGSIZE = (8., 6.) # default figure size
D_REFORMAT = True # default reformat value
D_FORMATTED = False # default formatted value
D_RAWDATA = MyData() # default raw data
D_RAWDATA = MplData() # default raw data
D_INPUTARG = 'current' # default Input argument
# myIOs
......
......@@ -3,10 +3,10 @@ sys.path.insert(0, './')
import myplotlib as mpl
from myIOs import readStupidData
from axTest import AxTest
from figTest import FigTest
from ios_tests import read_stupid_data
from axes_tests import AxTest
from figures_tests import FigTest
data = readStupidData()
data = read_stupid_data()
fig = FigTest((data,))
# win = mpl.MyWin(fig) # requires a DISPLAY not yet available with the current runner (Jochen works one it).
......@@ -5,10 +5,10 @@ def script():
import sys
sys.path.insert(0, '../')
from myplotlib import MyData, EmptyFig, EmptyAxes
from myplotlib import MplData, EmptyFig, EmptyAxes
# read various data
rawdata = MyData(data=[0., 1., 0., 1.])
rawdata = MplData(data=[0., 1., 0., 1.])
# make a figure
fig = EmptyFig()
......@@ -28,4 +28,4 @@ if __name__ == '__main__':
fig = script()
# print the figure with modif into a file
fig.print2file('./tuto000.png', as_seen=True)
fig.print_to_file('./tuto000.png', as_seen=True)
......@@ -5,21 +5,21 @@ def script():
import sys
sys.path.insert(0, '../')
from myplotlib import MyData, MyAxes, EmptyFig
from myplotlib import MplData, MplAxes, EmptyFig
class MySuperAxes(MyAxes):
class MySuperAxes(MplAxes):
def formatRawData(self, rawdata):
self.data = {'xdata': [rawdata.data[0], rawdata.data[1]],
'ydata': [rawdata.data[2], rawdata.data[3]]}
def format_rawdata(self, rawdata):
self.data = {'x_data': [rawdata.data[0], rawdata.data[1]],
'y_data': [rawdata.data[2], rawdata.data[3]]}
return(True)
def plotting(self):
self.plot(self.data['xdata'], self.data['ydata'])
self.plot(self.data['x_data'], self.data['y_data'])
return(True)
# read various data
rawdata = MyData(data=[0., 1., 0., 1.])
rawdata = MplData(data=[0., 1., 0., 1.])
# make a figure
fig = EmptyFig()
......@@ -35,4 +35,4 @@ if __name__ == '__main__':
fig = script()
# print the figure with modif into a file
fig.print2file('./tuto001.png')
fig.print_to_file('./tuto001.png')
......@@ -5,26 +5,26 @@ def script():
import sys
sys.path.insert(0, '../')
from myplotlib import MyData, MyAxes, MyFig
from myplotlib import MplData, MplAxes, MplFig
class MySuperAxes(MyAxes):
class MySuperAxes(MplAxes):
def formatRawData(self, rawdata):
self.data = {'xdata': [rawdata.data[0], rawdata.data[1]],
'ydata': [rawdata.data[2], rawdata.data[3]]}
def format_rawdata(self, rawdata):
self.data = {'x_data': [rawdata.data[0], rawdata.data[1]],
'y_data': [rawdata.data[2], rawdata.data[3]]}
return(True)
def plotting(self):
self.plot(self.data['xdata'], self.data['ydata'])
self.plot(self.data['x_data'], self.data['y_data'])
return(True)
class MySuperFigure(MyFig):
class MySuperFigure(MplFig):
def addAxes(self):
self.add_axes(MySuperAxes(self), "ax1")
# read various data
rawdata = MyData(data=[0., 1., 0., 1.])
rawdata = MplData(data=[0., 1., 0., 1.])
# make a figure
fig = MySuperFigure((rawdata,))
......@@ -36,4 +36,4 @@ if __name__ == '__main__':
fig = script()
# print the figure with modif into a file
fig.print2file('./tuto002.png')
fig.print_to_file('./tuto002.png')
Supports Markdown
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