[Kst] Default labels

Barth Netterfield netterfield at astro.utoronto.ca
Tue Feb 15 21:49:17 CET 2011


Here is what I am about to implement, unless there are objections:

Introduce
struct labelInfo {
  QString Name;
  QString Units;
  QString Quantity;
}

Relations (curves, images) get xLableInfo() and yLabelInfo()
Vectors labelInfo().  Matrixes get xLabelInfo and yLabelInfo()

rather than QString xLabel, etc, as they do now.

Then, the plotrenderitem and the legend boxes can make more intelligent choices.

As to the more intelligent choices, there has been some discussion already.

A couple points I'm not convinced about:

1) what should happen when Quantity or Units disagree when there are
more than one curve in a plot?
   A) don't list Quantity or Units at all in the axis label, and
instead put them in the legend with the name.
   B) List only one, since this should only happen if there is either
a typo or nonsense afoot.
   C) don't list Quantity or Units at all, since there may be either a
typo or nonsense afoot.
Right now it does B.  Nicolas wants A.

2) What should happen to the legend name when all of the curves have
the same named X vector?
  A) Stick with yName vs xName for all the entries, to keep things unambiguous.
  B) Just use yName, to keep things short, and change the X label to
xName: xQuantity [xUnits] (eg, CPU_TIME: Time [Seconds]), or xName
[xUnits] if quantity is not defined
Right now it uses A.  Nicolas has proposed B.

3) How should the user override the legend name if we go context
sensitive legend names (ie, 1A or 2B).
Right now, the legend name is the curve name, so you just change the
curve name in the curve dialog.

-- 
C. Barth Netterfield
University of Toronto
416-845-0946


More information about the Kst mailing list