[python] Stub a matplotlib module

This commit is contained in:
Romain Goyet
2020-03-10 20:55:22 -04:00
committed by Émilie Feral
parent 2b73c4c9aa
commit c99bed6922
12 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
extern "C" {
#include "modpyplot.h"
}
#include "port.h"
#include "plot_controller.h"
Matplotlib::PlotController sPlotController;
mp_obj_t modpyplot_plot(mp_obj_t x, mp_obj_t y) {
// Ensure x and y are arrays
// "Push" x and y on bigger arrays
}
mp_obj_t modpyplot_show() {
MicroPython::ExecutionEnvironment * env = MicroPython::ExecutionEnvironment::currentExecutionEnvironment();
env->displayViewController(&sPlotController);
}