Changes
Page history
yfournier created page: create your first axes
authored
Feb 15, 2017
by
Yori Fournier
Show whitespace changes
Inline
Side-by-side
create-your-first-axes.md
0 → 100644
View page @
16c589f5
# 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