Bug 90196

Summary: Suggestions for really nice black & white plots
Product: [Applications] kst Reporter: Nicolas Brisset <nicolas.brisset>
Component: plottingAssignee: Rick Chern <rchern>
Status: RESOLVED FIXED    
Severity: wishlist CC: kst
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:

Description Nicolas Brisset 2004-09-24 22:54:45 UTC
Version:           1.0.0_devel (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.3.2 
OS:                Solaris

This is somehow related to bug #90124 and bug #86501 (where it seems I failed to convince Barth !), you'll understand why just below. But for once, I will not reopen resolved bugs :-)

Basically, what we all need is to be able to differentiate curves. I see only 4 ways to do that, but all have limitations and some apply only for curves with a line and not isolated points:
- change colors (not suited for B&W printing)
- change line style (OK but there aren't that many styles available so that it has to be used together with something else)
- change line width (limited in that differences in width have to be big to be visible, but we don't want too thick curves)
- use symbols (potentially unlimited in number of variants if you allow any character to be used as a symbol, but there should not be too many symbols if you still want to see the curves).

kst currently primarily uses curve colors for differentiation, and actually does  a good job at that. The major problem is that it is not so great for B&W printing :-(

As a matter of fact, xmgrace even offers more options with symbols as you can use a symbol color different from that of the line, scale it and use different patterns/transparency. I think it is good to have so much choice as nobody will force you to use all options, but it is probably not all useful. 
I'd say that especially in the context of B&W printing, it would be enough to add scaling, and it would be NECESSARY to add the symbol skip option as found in xmgrace (hence wish #86501).

All in all, the most useful options to differentiate curves in B&W are line style and symbols, possibly also line widths or gray levels (with only 2 or 3 steps).

To sum up, I'd suggest implementing a new action (it may for instance go to a Edit->Change to B&W menu) that would:
- set plot backgrounds to white
- set the curve color of all curves to black (or optionally 2 or 3 _distinguisable_ levels of gray)
- cycle line styles first and then symbols (glyph and/or size) or the other way around, based on user preference
- optionally cycle line widths.
I believe this would require a basic dialog so that the user can choose the order (like symbol type then line style then line width, or line style then symbol size then line color, you get the idea...) and number of symbols to draw for each curve so it doesn't get overcrowded (see #86501).

Thoughts ?
Comment 1 Netterfield 2004-09-25 06:21:00 UTC
Ahhh... I understand the request now.... 

Comment 2 Nicolas Brisset 2004-10-19 14:48:35 UTC
This ("Change to B&W") would be one of the tools that I'd put in the "Tools" menu I suggest in bug #91672.
Comment 3 George Staikos 2005-05-26 19:53:59 UTC
  What are your plans for implementing this?
Comment 4 Rick Chern 2005-05-26 20:07:13 UTC
This might be implemented as suggested as a "Change to B&W" item in the "Tools" menu. The tool would behave like suggested and change all plot backgrounds to white, as well as cycle curve properties (line style, symbols...) as specified by the user.
Comment 5 George Staikos 2005-05-26 21:11:23 UTC
Ok, but I meant more along the lines of the internal implementation.  I started to implement some of this in a more generic sense.  See kstcolorsequence for some of the stubs I started on.  I think it would involve changing the color sequence over to monochrome or greyscale recursively.  Symbols could also be done but we need a generic solution for it.  This is very important because it has impact on KstScript.  The tool in the UI should be secondary to the internal implementation.
Comment 6 Rick Chern 2005-05-27 02:47:10 UTC
By a more generic solution, would there be a kstsymbolsequence? (and kstlinesequence, etc)? 
Comment 7 George Staikos 2005-05-27 15:25:11 UTC
On Thursday 26 May 2005 20:47, Rick Chern wrote:
> By a more generic solution, would there be a
> kstsymbolsequence? (and kstlinesequence, etc)?


   It might make sense to have these too.  In particular though, we need the 
implementation to be integrated at a lower level than the dialog so that it 
is a clean part of the API.  I think it needs to go into the plot API.  The 
UI code would look something like:

foreach (w, windows) {
   foreach (p, w.plots) {
      p.setColorMode(Monochrome);
   }
}

  This maps nicely into the script language.
Comment 8 Rick Chern 2005-06-03 23:35:26 UTC
SVN commit 421760 by rchern:

- use correct defaults for printing
- allow cycling of line width, line style, and point style when printing in monochrome

CCMAIL: 90196-done@bugs.kde.org

 M  +64 -16    kst.cpp  
 M  +97 -13    kst2dplot.cpp  
 M  +15 -2     kst2dplot.h  
 M  +9 -0      kstbasecurve.h  
 M  +24 -5     kstnumbersequence.cpp  
 M  +12 -1     kstnumbersequence.h