wxMathPlotを使用して、2次元の座標曲線グラフを描画します



Use Wxmathplot Draw Two Dimensional Coordinate Curve Graph



wxMathPlotを使用して、2次元の座標曲線グラフを描画します
作業環境:wxWidgets-3.0.4、codeblcok17.12、win10
最初の一歩 :最初にwxMathPlotのwxMathPlot-0.1.2.tar.gz(https://sourceforge.net/projects/wxmathplot/files/)をダウンロードします。通常、必要なファイルはwxmathplot.cppとwxmathplot.hの2つだけです。
第二段階 :codeblockを使用して、wxWidgetsの空のプロジェクトを作成します。
3番目のステップ :mp1.cppの例を使用して、3つのファイルwxmathplot.cpp、wxmathplot.h、およびmp1.cppを追加します。
以下のプロジェクトにコピーしてから、プロジェクトに3つのファイルを追加します。
4番目のステップ :wxmathplot.cppの内容を変更し、すべての ':: wxLogError'を 'wxLogError'に変更します。そうしないと、コンパイル時にエラーが発生します。

In file included from /home/wo/Desktop/install/wxMathPlot/wxMathPlot-0.1.2/mathplot.cpp:36:0: /home/wo/Desktop/install/wxMathPlot/wxMathPlot-0.1.2/mathplot.cpp: In member function 'void mpMovableObject::ShapeUpdated()': /usr/include/wx-3.0/wx/log.h:1361:5: error: expected id-expression before 'for' for ( bool loopvar = false

コンパイルして実行すると、デモコードの結果が表示されます。
画像