Commit a81564e5 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

doc: dev: Write Plot section.

Showing with 29 additions and 2 deletions
+29 -2
...@@ -602,8 +602,35 @@ creation, this stack is accessible at =self._undo_stack=. ...@@ -602,8 +602,35 @@ creation, this stack is accessible at =self._undo_stack=.
) )
#+end_src #+end_src
*** TODO Plot *** Plot
*** TODO Mainwindow
To define a new plot you can create a class who inherit to APlot. The
creator need threee argument:
- A =canvas= of type =MplCanvas=
- A =data= used in =draw= and =update= to create and update the plot
- A optional =toolbar= of type =PamhyrToolbar=
This class must implement two method =draw= and =update=, the first
method to draw the plot from scratch, the second to update the plot if
data has changed.
#+begin_src python :python python3 :results output :noweb yes
from View.Plot.APlot import APlot
class MyPlot(APlot):
def __init__(self, canvas=None, data=None, toolbar=None):
super(MyPlot, self).__init__(
canvas=canvas,
data=data,
toolbar=toolbar
)
def draw(self):
# Draw function code...
def update(self, ind = None):
# Update function code...
#+end_src
** TODO Solver ** TODO Solver
#+name: graph-pipeline #+name: graph-pipeline
......
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