doc: dev: Write Plot section.

setup.py
Pierre-Antoine Rouby 2023-09-27 09:20:17 +02:00
parent f93f3fe122
commit a81564e582
1 changed files with 29 additions and 2 deletions

View File

@ -602,8 +602,35 @@ creation, this stack is accessible at =self._undo_stack=.
)
#+end_src
*** TODO Plot
*** TODO Mainwindow
*** Plot
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
#+name: graph-pipeline