yfournier created page: home authored by Yori Fournier's avatar Yori Fournier
...@@ -62,7 +62,7 @@ Now you can start to enjoy the power of `myplotlib` ...@@ -62,7 +62,7 @@ Now you can start to enjoy the power of `myplotlib`
python2.7 python2.7
``` ```
## STEP 2: Import the module. ## STEP 2: Import the module.
```python ```python
# IMPORT the MODULE # IMPORT the MODULE
...@@ -91,7 +91,7 @@ In `mymodule/myIOs` are two files containing the functions `readRun`, and `readS ...@@ -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` Both function returns the data container of myplotlib, `MyData`
```python ```python
# READ Some data # READ Some data
run1 = readRun('./mymodule/data/serie1/run1.txt') run1 = readRun('./mymodule/data/serie1/run1.txt')
``` ```
...@@ -174,7 +174,7 @@ ax.get_xlabel() ...@@ -174,7 +174,7 @@ ax.get_xlabel()
>>> u'${\\rm x}~[{\\rm m}]$' >>> 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)) 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` 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. ...@@ -197,7 +197,7 @@ This should produce a window on which `fig` should be plotted.
# Import the module # Import the module
from mymodule import * from mymodule import *
# Read some data # Read some data
run1 = readRun('./mymodule/data/serie1/run1.txt') run1 = readRun('./mymodule/data/serie1/run1.txt')
# Create a figure # Create a figure
...@@ -205,4 +205,48 @@ fig = FigOneAxes3D((run1,), AxResults) ...@@ -205,4 +205,48 @@ fig = FigOneAxes3D((run1,), AxResults)
# Create a window where the figure is shown # Create a window where the figure is shown
win = MyWin(fig) 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)
```