Skip to content

Commit

Permalink
#279 two smaller plots automatically show after choosing regimes regr…
Browse files Browse the repository at this point in the history
…ession
  • Loading branch information
lixun910 committed May 30, 2017
1 parent 7c6186e commit 88a2c4e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Explore/LisaScatterPlotView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ LisaScatterPlotCanvas::~LisaScatterPlotCanvas()
}
}

void LisaScatterPlotCanvas::ShowRegimesRegression(bool flag)
{
is_show_regimes_regression = flag;
PopulateCanvas();
}

void LisaScatterPlotCanvas::OnRandDlgClose( wxWindowDestroyEvent& event)
{
rand_dlg = 0;
Expand Down Expand Up @@ -927,7 +933,7 @@ LisaScatterPlotFrame::~LisaScatterPlotFrame()

void LisaScatterPlotFrame::OnViewRegimesRegression( wxCommandEvent& event)
{
((LisaScatterPlotCanvas*) template_canvas)->is_show_regimes_regression = event.IsChecked();
((LisaScatterPlotCanvas*) template_canvas)->ShowRegimesRegression(event.IsChecked());

UpdateOptionMenuItems();
}
Expand Down
5 changes: 4 additions & 1 deletion Explore/LisaScatterPlotView.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,16 @@ class LisaScatterPlotCanvas : public ScatterNewPlotCanvas
void UpdateRegSelectedLine();
void UpdateRegExcludedLine();

bool is_show_regimes_regression;
void ShowRegimesRegression(bool flag);


protected:
void RegimeMoran(std::vector<bool>& undefs,
SimpleLinearRegression& regime_lreg,
std::vector<double>& X,
std::vector<double>& Y);
void OnRandDlgClose( wxWindowDestroyEvent& event);

virtual void PopulateCanvas();
virtual void PopCanvPreResizeShpsHook();
LisaCoordinator* lisa_coord;
Expand All @@ -76,6 +78,7 @@ class LisaScatterPlotCanvas : public ScatterNewPlotCanvas
std::vector<GdaVarTools::VarInfo> var_info_orig;
RandomizationDlg* rand_dlg;
GdaShapeText* morans_i_text;
bool is_show_regimes_regression;

DECLARE_EVENT_TABLE()
};
Expand Down

0 comments on commit 88a2c4e

Please sign in to comment.