Changes
Page history
yfournier created page: home
authored
Feb 15, 2017
by
Yori Fournier
Hide whitespace changes
Inline
Side-by-side
get-started.md
View page @
cde880b0
...
...
@@ -62,7 +62,7 @@ Now you can start to enjoy the power of `myplotlib`
python2.7
```
## STEP 2: Import the module.
## STEP 2: Import the module.
```
python
# IMPORT the MODULE
...
...
@@ -91,7 +91,7 @@ In `mymodule/myIOs` are two files containing the functions `readRun`, and `readS
Both function returns the data container of myplotlib,
`MyData`
```
python
# READ Some data
# READ Some data
run1
=
readRun
(
'
./mymodule/data/serie1/run1.txt
'
)
```
...
...
@@ -174,7 +174,7 @@ ax.get_xlabel()
>>>
u
'
${
\\
rm x}~[{
\\
rm m}]$
'
```
As you can see any part of the object can be access.
As you can see any part of the object can be access.
for more details see matplotlib documentation (see
[
doc
](
http://matplotlib.org/api/axes_api.html
)
)
Now it is time to show the data set on the screen. To do so
`myplotlib`
...
...
@@ -197,7 +197,7 @@ This should produce a window on which `fig` should be plotted.
# Import the module
from
mymodule
import
*
# Read some data
# Read some data
run1
=
readRun
(
'
./mymodule/data/serie1/run1.txt
'
)
# Create a figure
...
...
@@ -205,4 +205,48 @@ fig = FigOneAxes3D((run1,), AxResults)
# Create a window where the figure is shown
win
=
MyWin
(
fig
)
```
\ No newline at end of file
```
## Switch dataset
```
python
# Import the module
from
mymodule
import
*
# Read some data
run1
=
readRun
(
'
./mymodule/data/serie1/run1.txt
'
)
run2
=
readRun
(
'
./mymodule/data/serie1/run2.txt
'
)
# Create a figure
fig
=
FigOneAxes3D
((
run1
,),
AxResults
)
# Create a window where the figure is shown
win
=
MyWin
(
fig
)
# Switch from run1 to run2
fig
.
update
(
rawdata
=
(
run2
,))
# Actualize the window
win
.
refresh
()
```
## Plot AxMaxResults et AxParameterSpace with data serie1
```
python
# Import the module
from
mymodule
import
*
# Read some data
serie1
=
readRun
(
'
./mymodule/data/serie1/serie1.txt
'
)
# Create a figure figmax
figmax
=
FigOneAxes2D
((
serie1
,),
AxMaxResults
)
# Create a window winmax
winmax
=
MyWin
(
figmax
,
fignum
=
0
)
# Create a figure
figps
=
FigOneAxes2D
((
serie1
,),
AxParameterSpace
)
# Create a window winps
winps
=
MyWin
(
figps
,
fignum
=
1
)
```