|
|
# Create your first Axes
|
|
|
|
|
|
Create `mymodule/myAxes/<name of my class>.py`
|
|
|
|
|
|
> Here we will use mymodule/myAxes/axMyFirstAxes.py
|
|
|
|
|
|
```python
|
|
|
# Import the mother class MyAxes from the local myplotlib module
|
|
|
from ..myplotlib import MyAxes
|
|
|
|
|
|
|
|
|
# Begin of the class
|
|
|
class axMyFirstAxes(MyAxes):
|
|
|
|
|
|
# This is the function that will format the rawdata so that they can be plotted
|
|
|
def formatRawdata(self, rawdata):
|
|
|
|
|
|
rawdata1 = rawdata.data[<some key>]
|
|
|
rawdata2 = rawdata.data[<some key>]
|
|
|
|
|
|
# Extract some part of the data and format them
|
|
|
|
|
|
if(self.fig.keywords[<some key>]):
|
|
|
# format in a certain way
|
|
|
else:
|
|
|
# format in another way
|
|
|
|
|
|
xdata = <some formular>
|
|
|
ydata = <some formular>
|
|
|
|
|
|
self.data = {'xdata': xdata,
|
|
|
'ydata': ydata}
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |