]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/plot/plot.cpp
fixes from the 2.2 branch
[wxWidgets.git] / samples / plot / plot.cpp
index 46e9c363ac144bd90af4d76d099f3e6e92a567b0..3898313e1631bf629ac785d6a4d87f89894cb669 100644 (file)
@@ -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 ) );