Version: 0.98-devel (using KDE 3.2.3, compiled sources) Compiler: gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) OS: Linux (i686) release 2.4.20-8smp 1) When PSD and XY are selected in the data wizard, it would be useful if a XY curve and its corresponding PSD had the same color. 2) Possibility to have all the PSD in log-log, log-linear, linear-log or linear-linear
#1 is a problem if the curves end up in the same plot - they will be indistinguishable and basically look like a mess. #2 would only apply for PSD-only mode, right? If "XY and PSD" is enabled, how do we plot XY in linear-linear and the PSD in linear-log, for instance, and choose the scale properly? They might end up in the same plot and the XY will end up in linear-log, or vice versa. This is also a problem if the user wants to use existing plots for the curves.
I can't think of a situation where a vector and its psd would be sensibly displayed in the same plot. So: Since it is very common to want log plots of PSD's and since it is completely safe to have curves and their psd's be of the same colour. ... I think both are good suggestions and should be implemented.
CVS commit by netterfield: Check boxes for log-log, log-linear, etc psds from data wizard partial fix for 83943 Also fix X-axis assignment in psd curves plotted from data wizard. Log X mode does not work well now, because f goes to 0... log(0) is -inf... This needs a workaround. CCMAIL: 83943@bugs.kde.org M +104 -54 datawizard.ui 1.54 M +21 -8 datawizard.ui.h 1.85 M +6 -6 kstfilterdialog_i.cpp 1.16
CVS commit by arwalker: This should make the PSD curve the same color as the data curve. It also make the PSD point style the same as the data point style (if applicable). I think this now closes 83943, with Bath's earlier fix. CCMAIL: 83943-done@bugs.kde.org M +15 -5 datawizard.ui.h 1.87 --- kdeextragear-2/kst/kst/datawizard.ui.h #1.86:1.87 @@ -385,4 +385,6 @@ void DataWizard::finished() KstVectorList l; QString name = QString("V%1-%2").arg(KST::vectorList.count()).arg(_xVector->currentText()); + QValueList<QColor> colors; + QColor color; uint n_curves = 0; uint n_steps = 0; @@ -533,6 +535,7 @@ void DataWizard::finished() if (_radioButtonPlotData->isChecked() || _radioButtonPlotDataPSD->isChecked()) { name = KST::suggestCurveName((*it)->tagName()); - KstBaseCurvePtr c = new KstVCurve(name, xv, *it, 0L, 0L, - KstColorSequence::next(static_cast<Kst2DPlot*>((*pit).data())->Curves,static_cast<Kst2DPlot*>((*pit).data())->backgroundColor())); + color = KstColorSequence::next(static_cast<Kst2DPlot*>((*pit).data())->Curves,static_cast<Kst2DPlot*>((*pit).data())->backgroundColor()); + colors.append(color); + KstBaseCurvePtr c = new KstVCurve(name, xv, *it, 0L, 0L, color); if (_drawBoth->isChecked()) { c->setHasPoints(true); @@ -577,6 +580,8 @@ void DataWizard::finished() // create the PSDs... // - if (_radioButtonPlotPSD->isChecked() || - _radioButtonPlotDataPSD->isChecked()) { + if (_radioButtonPlotPSD->isChecked() || _radioButtonPlotDataPSD->isChecked()) { + KstVCurvePtr c; + int indexColor = 0; + ptype = 0; app->slotUpdateProgress(n_steps, prg, i18n("Creating PSDs...")); @@ -593,5 +598,10 @@ void DataWizard::finished() _kstFFTOptions->VectorUnits->text(), _kstFFTOptions->RateUnits->text()); - KstVCurvePtr c = new KstVCurve(name + "-curve", p->vX(), p->vY(), 0L, 0L, KstColorSequence::next(static_cast<Kst2DPlot*>((*pit).data())->Curves,static_cast<Kst2DPlot*>((*pit).data())->backgroundColor())); + if (_radioButtonPlotPSD->isChecked() || colors.count() <= indexColor) { + c = new KstVCurve(name + "-curve", p->vX(), p->vY(), 0L, 0L, KstColorSequence::next(static_cast<Kst2DPlot*>((*pit).data())->Curves,static_cast<Kst2DPlot*>((*pit).data())->backgroundColor())); + } else { + c = new KstVCurve(name + "-curve", p->vX(), p->vY(), 0L, 0L, colors[indexColor]); + indexColor++; + } if (_drawBoth->isChecked()) { c->setHasPoints(true);