Bug 94346 - More descriptive automatic plot names
Summary: More descriptive automatic plot names
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.0.0
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-03 20:20 UTC by D. V. Wiebe
Modified: 2005-03-10 20:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description D. V. Wiebe 2004-12-03 20:20:01 UTC
Version:           1.0.0 (using KDE 3.3.1, compiled sources)
Compiler:          gcc version 3.3.4
OS:                Linux (i686) release 2.6.9

It would be nice if plots were given more descriptive automatic names than just P1, P2, &c.  This is especially useful if I create a bunch of single curve plots from the command line so:

kst -y FOO -y BAR -y BAZ -m 2 data.file

and then want to add a curve to, say, the top right plot later using the data wizard - I can never remember whether plots are tiled in X first or Y, so it's not clear to me whether the top right plot is P2 or P3.  (Having to go back and consult the command line (if it's still around) is rather lame.)

A name such as P2-BAR or P3-BAZ would be much more helpful.
Comment 1 Andrew Walker 2005-03-10 20:27:01 UTC
CVS commit by arwalker: 

When run from the command line, if curves are created one per plot, then label the plots P<n>-<y> where <n> is some integer (as before) and <y> is the name of the y-vector in some simple curve. All other cases remain as before.

CCMAIL: 94346-done@bugs.kde.org


  M +4 -4      main.cpp   1.103


--- kdeextragear-2/kst/kst/main.cpp  #1.102:1.103
@@ -555,4 +555,5 @@ int main(int argc, char *argv[]) {
       
                   if (in.sep_plots) {
+                    plot->setTagName(plot->tagName() + QString("-") + yvector->tagName());
                     i_plot++;
                     if (i_plot < in.n_plots) {
@@ -656,6 +657,5 @@ int main(int argc, char *argv[]) {
     
                 hs = new KstHistogram(KST::suggestHistogramName(yvector->field()),
-                    KstVectorPtr(yvector), min, max, N,
-                    KST_HS_NUMBER);
+                    KstVectorPtr(yvector), min, max, N, KST_HS_NUMBER);
                 KstVCurvePtr vc = new KstVCurve(KST::suggestCurveName(hs->tagName(), true),
                     hs->vX(), hs->vY(),
@@ -743,5 +743,5 @@ int main(int argc, char *argv[]) {
         kst->showQuickStartDialog();
       }
-      for (int i=0; i<strErrors.size(); i++) {
+      for (size_t i=0; i<strErrors.size(); i++) {
         KstDebug::self()->log(strErrors[i], KstDebug::Warning);
       }