[python] Matplotlib: init store range depending on 'auto' parameter

This commit is contained in:
Émilie Feral
2020-03-26 12:13:41 +01:00
parent 8aa1930f80
commit 81170610eb
3 changed files with 3 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ mp_obj_t modpyplot_axis(mp_obj_t arg) {
sPlotStore->setXMax(mp_obj_get_float(items[1]));
sPlotStore->setYMin(mp_obj_get_float(items[2]));
sPlotStore->setYMax(mp_obj_get_float(items[3]));
sPlotStore->setAxesAuto(false);
}
// Build the return value

View File

@@ -3,6 +3,7 @@
namespace Matplotlib {
void PlotController::viewWillAppear() {
m_store->initRange();
curveView()->reload();
}

View File

@@ -121,6 +121,7 @@ public:
void setAxesRequested(bool b) { m_axesRequested = b; }
bool axesRequested() const { return m_axesRequested; }
void setAxesAuto(bool b) { m_axesAuto = b; }
void initRange();
void setGridRequested(bool b) { m_gridRequested = b; }