X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/279ababf7baa0655a58074b868da222db7cc5a4b..fcbb6b37bfefb6b340fbb49e44a2f4c8259f1211:/samples/plot/plot.cpp diff --git a/samples/plot/plot.cpp b/samples/plot/plot.cpp index 46e9c363ac..3898313e16 100644 --- a/samples/plot/plot.cpp +++ b/samples/plot/plot.cpp @@ -121,9 +121,16 @@ MyFrame::MyFrame() m_plot = new wxPlotWindow( this, -1, wxPoint(0,0), wxSize(100,100), wxSUNKEN_BORDER | wxPLOT_DEFAULT ); m_plot->SetUnitsPerValue( 0.01 ); + m_plot->SetScrollOnThumbRelease( TRUE ); m_plot->Add( new MyPlotCurve( 0, -1.5, 1.5 ) ); m_plot->Add( new MyPlotCurve( 50, -1.5, 1.5 ) ); + wxPlotOnOffCurve *oo = new wxPlotOnOffCurve( 10 ); + oo->Add( 10, 20 ); + oo->Add( 25, 30 ); + oo->Add( 100, 400 ); + oo->Add( 1000, 2000 ); + m_plot->Add( oo ); m_log = new wxTextCtrl( this, -1, "This is the log window.\n", wxPoint(0,0), wxSize(100,100), wxTE_MULTILINE ); wxLog *old_log = wxLog::SetActiveTarget( new wxLogTextCtrl( m_log ) );