Qtiplot
QtiPlot http://www.soft.proindependent.com/qtiplot.html
codes modified by yotrew
Qtiplot main program http://sdrv.ms/QHvyH4
Qtiplot 3rd party http://sdrv.ms/QHvzLe
1. install the following libraries: Qt (>= 4.5.0), GSL, muParser (1.32), zlib and libpng.
a. Install QT SDK(http://qt-project.org/downloads)
b. Gsl for Windows http://gnuwin32.sourceforge.net/packages/gsl.htm Gsl for Windows
put lib & include path to C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\ or C:\qtiplot-0.9.8.9\3rdparty\gsl
exe command line
cd C:\qtiplot-0.9.8.9\3rdparty\gsl
lib /machine:i386 /def:libgsl.def
lib /machine:i386 /def:libgslcblas.def
c. LibPng for Windows http://gnuwin32.sourceforge.net/packages/libpng.htm
put lib & include path to C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\
exe command line
cd C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib
lib /machine:i386 /def:libpng12.def
d. Zlib for Windows http://gnuwin32.sourceforge.net/packages/zlib.htm
put lib & include path to C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\
e. download tamu_anova, create lib & DLL with VS2010 (need gsl library)
tamu_anova.h
Line 36
- long factor[][2], long I,
+ long **factor, long I,
anova_2.c
Line 58
-tamu_anova_twoway (double data[], long factor[][2], long I, long J[2],
+tamu_anova_twoway (double data[], long** factor, long I, long J[2],
make
put tamu_anova.h to include path
put libtamuanova.a to lib path
f. download ALGLIB library(http://www.alglib.net/) for ap.h & idwint.h http://www.alglib.net/translator/re/
version <= 2.6
fft.h <- delete or rename
3. Set Path=C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin Set lib=C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib
4. moodify config file,makefile, .cpp & .h
a. copy qtiplot-0.9.8.9\build.conf.sample to build.conf, modify build.conf and change include path and lib path
# link statically against a copy in 3rdparty/
#GSL_LIBS = $$QTI_ROOT/3rdparty/gsl/lib/libgsl.a \
# $$QTI_ROOT/3rdparty/gsl/lib/libgslcblas.a
#on Windows
GSL_LIBS = $$QTI_ROOT/3rdparty/gsl/lib/libgsl.lib \
$$QTI_ROOT/3rdparty/gsl/lib/libgslcblas.lib
b. commnet C:\qtiplot-0.9.8.9\manual\Makefile
#all: en pdf-it
en: web pdf
it: web-it pdf-it
# we can't name the target "html", since there is already a folder with that name
# and so make thinks this target is already up to date
web:
# docbook2html -d qtiplot.dsl docbook-en/index.docbook -e no-valid
web-it:
# docbook2html -d qtiplot.dsl docbook-it/index.docbook -e no-valid
pdf:
# dblatex -o qtiplot-manual-en.pdf -c dblatex.conf docbook-en/index.docbook
pdf-it:
# dblatex -o qtiplot-manual-it.pdf -c dblatex.conf docbook-it/index.docbook
c. others,on the below
5. Open command line
a. set vc enviroment variable
C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
b. cd qtiplot-0.9.8.9
c. qmake
d. make
6. download DLL(libgsl.dll/libgslcblas.dll libpng3.dll libpng12.dll)
put libtamuanova.dll,libgsl.dll/libgslcblas.dll libpng3.dll libpng12.dll
to qtiplot path
ps. ex. libgsl.dll/libgslcblas.dll --> download gsl Binaries (http://gnuwin32.sourceforge.net/packages/gsl.htm)
7. execute qtiplot, good luck
----Modify codes-----
C:\qtiplot-0.9.8.9\3rdparty\qwtplot3d\include\qwt3d_openglhelper.h
add #include <GL/glu.h>
C:\qtiplot-0.9.8.9\3rdparty\qwtplot3d\include\qwt3d_label.h
add #include <qmath.h> //for M_PI
C:\qtiplot-0.9.8.9\3rdparty\qwtplot3d\src\qwt3d_scale.cpp line 71
eng_suff = '?; --> eng_suff = 'u'; //delete this line and rewrite it;
C:\qtiplot-0.9.8.9\3rdparty\qwtplot3d\src\qwt3d_io_gl2ps.cpp
add #include <windows.h>
c:\qtiplot-0.9.8.9\3rdparty\qwtplot3d\3rdparty\gl2ps\gl2ps.c
change Line 5164 & 5166
gl2psSVGGetColorString((prim->verts[0]).rgba,col); <-- Line 5164
GLfloat dy = 0.0;// y offset introduced by Ion Vasilief <-- Line 5166
--->
GLfloat dy = 0.0;// y offset introduced by Ion Vasilief
gl2psSVGGetColorString((prim->verts[0]).rgba,col);
----
c:\qtiplot-0.9.8.9\qtiplot\src\analysis
Convolution.cpp
Line 137
-double x_temp[d_n];
+double *x_temp=(double*)malloc(sizeof(double)*d_n);
Correlation.cpp
Line 160
-double x_temp[d_n], y_temp[d_n];
+double *x_temp=(double*)malloc(sizeof(double)*d_n);
+double *y_temp=(double*)malloc(sizeof(double)*d_n);
MultiPeakFit.cpp
Line 187
-double temp[d_n];
+double *temp=(double*)malloc(sizeof(double)*d_n);
ShapiroWilkTest.cpp
Line 58
-double a[n2];
+double *a=(double*)malloc(sizeof(double)*n2);
lowess.c
Line49
-int nax = isnan(x), nay = isnan(y);
+int nax = gsl_isnan(x), nay = gsl_isnan(y);
SmoothFilter.cpp
Line 395
-double initial_y[d_n];
+double *initial_y=(double*)malloc(sizeof(double)*d_n);
Line 399
-double robustness_weights[d_n];
+double *robustness_weights=(double*)malloc(sizeof(double)*d_n);
Line400
-double residuals[d_n];
+double *residuals=(double*)malloc(sizeof(double)*d_n);
Statistics.cpp
Line 115
-d_se = d_sd/sqrt(d_n);
+d_se = d_sd/sqrt((double)d_n);
tTest.cpp
Line 64
-return sqrt(d_n)*(d_mean - d_test_val)/d_sd;
+return sqrt((double)d_n)*(d_mean - d_test_val)/d_sd;
Line 69
-return sqrt(size)*(d_mean - d_test_val)/d_sd;
+return sqrt((double)size)*(d_mean - d_test_val)/d_sd;
Line 256
-d_s12 = gsl_stats_sd(d_data, 1, d_n)/sqrt(d_n);
+d_s12 = gsl_stats_sd(d_data, 1, d_n)/sqrt((double)d_n);
fft2D.cpp
Line 32
+ #include <qmath.h> //for M_PI
Line 53
-const double SQ_2=sqrt(2);
+const double SQ_2=sqrt((double)2);
Line 54
-double pair_re[size_2], pair_im[size_2], impair_re[size_2], impair_im[size_2];
+double* pair_re=(double*)malloc(sizeof(double)*size_2);
+double* pair_im=(double*)malloc(sizeof(double)*size_2);
+double* impair_re=(double*)malloc(sizeof(double)*size_2);
+double* impair_im=(double*)malloc(sizeof(double)*size_2);
Line 84
-const double SQ_2=sqrt(2);
+const double SQ_2=sqrt((double)2);
Line85
-double pair_re[size_2], pair_im[size_2], impair_re[size_2], impair_im[size_2];
+double* pair_re=(double*)malloc(sizeof(double)*size_2);
+double* pair_im=(double*)malloc(sizeof(double)*size_2);
+double* impair_re=(double*)malloc(sizeof(double)*size_2);
+double* impair_im=(double*)malloc(sizeof(double)*size_2);
Line 122
-double x_int_l[width], x_int2_l[width], x_int_c[height], x_int2_c[height];
+double* x_int_l=(double*)malloc(sizeof(double)*width);
+double* x_int2_l=(double*)malloc(sizeof(double)*width);
+double* x_int_c=(double*)malloc(sizeof(double)*height);
+double* x_int2_c=(double*)malloc(sizeof(double)*height);
Line 174
-double x_int_l[width], x_int2_l[width], x_int_c[height], x_int2_c[height];
+double* x_int_l=(double*)malloc(sizeof(double)*width);
+double* x_int2_l=(double*)malloc(sizeof(double)*width);
+double* x_int_c=(double*)malloc(sizeof(double)*height);
+double* x_int2_c=(double*)malloc(sizeof(double)*height);
Anova.cpp
Line 152
-long f[n][2];
+long **f;
+f=(long**)malloc(sizeof(long *)*n);
+for(int i=0;i<n;i++)
+{
+ f[i]=(long*)malloc(sizeof(long )*2);
+}
----
c:\qtiplot-0.9.8.9\qtiplot\src\analysis\dialogs
FitDialog.cpp
Line 1052
-it->setFlags(!Qt::ItemIsEditable);
+it->setFlags((!Qt::ItemIsEditable?Qt::NoItemFlags:Qt::ItemIsSelectable));
---
c:\qtiplot-0.9.8.9\qtiplot\src\core
ApplicationWindow.h
Line 75
-class QAssistantClient;
+class QProcess;
ApplicationWindow.cpp
Line 177
- #include <QAssistantClient>
+ #include <QProcess>
Line 352
- assistant = new QAssistantClient(QString(), this );
+ assistant = new QProcess( this );
Line 11337
-QProcess *assist = new QAssistantClient(QString(), 0);
+QProcess *assist = new QProcess( 0);
Line 3468
-if (t->selectedYColumns().size() != 1 || fabs(sel.topRow() - sel.bottomRow()) < 2){
+if (t->selectedYColumns().size() != 1 || fabs((double)sel.topRow() - sel.bottomRow()) < 2){
Line 3534
-fabs(sel.topRow() - sel.bottomRow()) < 2){
+fabs((double)sel.topRow() - sel.bottomRow()) < 2){
Line 3621
-fabs(sel.topRow() - sel.bottomRow()) < 2){
+fabs((double)sel.topRow() - sel.bottomRow()) < 2){
Line 19052
-power = std::ceil(log10(data[rows - 1] - data[0]) - log10(rows - 1));
+power = std::ceil(log10(data[rows - 1] - data[0]) - log10((double)rows - 1));
Line 11338
-assist->setArguments( cmdLst );
-assist->showPage(helpPath);
-connect(assist, SIGNAL(assistantClosed()), qApp, SLOT(quit()) );
+assist->start(QLatin1String("assistant"), cmdLst);
Line 11370
-assistant->setArguments( cmdLst );
-assistant->showPage(helpFilePath);
+assistant->start(QLatin1String("assistant"), cmdLst);
ConfigDialog.cpp
Line 1393
-it->setFlags(!Qt::ItemIsEditable);
+it->setFlags((!Qt::ItemIsEditable?Qt::NoItemFlags:Qt::ItemIsSelectable));
----
c:\qtiplot-0.9.8.9\qtiplot\src\plot2D
ScaleDraw.cpp
Line 189
-eng_suff = '?; //delete this line and rewrite it;
+eng_suff = 'u'; // u<---????
Ln2ScaleEngine.cpp
Line 108
-if (interval.maxValue() / interval.minValue() < exp(1)){
+if (interval.maxValue() / interval.minValue() < exp((double)1)){
Log2ScaleEngine.cpp
Line 163
-const double lxmin = ::log2(interval.minValue());
+const double lxmin = ::log(interval.minValue())/::log(2.0);
Line 164
-const double lxmax = ::log2(interval.maxValue());
+ const double lxmax = ::log(interval.maxValue())/::log(2.0);
Line 228
-return QwtDoubleInterval(::log2(interval.minValue()),
- ::log2(interval.maxValue()));
+return QwtDoubleInterval(::log(interval.minValue()/::log(2.0)),
+ ::log(interval.maxValue()/::log(2.0)));
LogitScaleEngine.cpp
Line 89
-stepSize = fabs(qRound(stepSize));
+stepSize = fabs((double)qRound(stepSize));
MultiLayer.cpp
Line 882
-int sqr = (int)ceil(sqrt(layers));
+int sqr = (int)ceil(sqrt((double)layers));
ProbabilityScaleEngine.cpp
Line 90
-stepSize = fabs(qRound(stepSize));
+stepSize = fabs((double)qRound(stepSize));
QwtHistogram.cpp
Line 180
-double X[n];
+double *X=(double*)malloc(sizeof(double)*n);
Line 245
-double X[n], Y[n];
+ double *X=(double*)malloc(sizeof(double)*n);
+ double *Y=(double*)malloc(sizeof(double)*n);
RangeSelectorTool.cpp
Line 568
-((PlotCurve *)d_selected_curve)->type() == Graph::Graph::ErrorBars)
+((PlotCurve *)d_selected_curve)->type() == Graph::ErrorBars)
-----
c:\qtiplot-0.9.8.9\qtiplot\src\scripting\
muParserScript.h
Line 64
-double min(const QString& arg , int start = 0, int end = -1);
-doble max(const QString &arg, int start = 0, int end = -1);
-static double mu_min(const char *arg, double start = 1, double end = -1) {return current->min(arg, qRound(start - 1), qRound(end - 1));}
-static double mu_max(const char *arg, double start = 1, double end = -1) {return current->max(arg, qRound(start - 1), qRound(end - 1));}
+double min1(const QString& arg , int start = 0, int end = -1);
+doble max1(const QString &arg, int start = 0, int end = -1);
+static double mu_min(const char *arg, double start = 1, double end = -1) {return current->min1(arg, qRound(start - 1), qRound(end - 1));}
+static double mu_max(const char *arg, double start = 1, double end = -1) {return current->max1(arg, qRound(start - 1), qRound(end - 1));}
muParserScript.cpp
Line 511
-double muParserScript::min(const QString &arg, int start, int end)
+double muParserScript::min1(const QString &arg, int start, int end)
Line 525
-double muParserScript::max(const QString &arg, int start, int end)
+double muParserScript::max1(const QString &arg, int start, int end)
MyParser.cpp
Line 153
-if (isinf(Eval()))
+if (gsl_isinf(Eval()))
-----
c:\qtiplot-0.9.8.9\qtiplot\src\matrix\Matrix.cpp
Line 489
-d_undo_stack->push(new MatrixSymmetryOperation(d_matrix_model, RotateClockwise, tr("Rotate 90?)));
+d_undo_stack->push(new MatrixSymmetryOperation(d_matrix_model, RotateClockwise, tr("Rotate 90")));
Line 491
-d_undo_stack->push(new MatrixSymmetryOperation(d_matrix_model, RotateCounterClockwise, tr("Rotate -90?)));
+d_undo_stack->push(new MatrixSymmetryOperation(d_matrix_model, RotateCounterClockwise, tr("Rotate -90")));
----
C:\qtiplot-0.9.8.9\3rdparty\qwtplot3d\Makefile.Release
INCPATH = -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore"
INCPATH = -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\libpng" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore" ......
C:\qtiplot-0.9.8.9\3rdparty\qwtplot3d\Makefile.Release
LIBS = glu32.lib opengl32.lib gdi32.lib user32.lib ../libpng/libpng.lib .....
LIBS = glu32.lib opengl32.lib gdi32.lib user32.lib c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib\libpng.lib ......
c:\qtiplot-0.9.8.9\qtiplot\Makefile.Release
INCPATH = -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore"
INCPATH = -I"..\3rdparty\alglib" -I"..\3rdparty/tamu_anova/include" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore"
LIBS = glu32.lib opengl32.lib gdi32.lib user32.lib
LIBS = glu32.lib opengl32.lib gdi32.lib user32.lib "..\3rdparty\alglib\libalglib.lib" "..\3rdparty/tamu_anova/lib/libtamuanova.a"
----
other way,you can reference http://blog.sciencenet.cn/home.php?mod=space&uid=335764&do=blog&id=415646
---
sanpshot
--
Yotrew.Wing.蛋型.水瓶.U103.Che.KUAS
Yotrew.Wing.M98111XX@MS98.EDU/MIS.CSU
Yotrew.Wing.69241XX@MS92.CS.CCU
Yotrew.Wing.584012XX@89乙.Che.KUAS
Yotrew.Wing.b8803XXX@U92A.CSIE.ISU