Bug 92145 - Tick intervals incorrect when using re-interpreted time units.
Summary: Tick intervals incorrect when using re-interpreted time units.
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Netterfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-26 18:13 UTC by Netterfield
Modified: 2004-10-27 21:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Netterfield 2004-10-26 18:13:49 UTC
Version:           1.0.0_devel (using KDE 3.3.0, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.8-gentoo-r3

Plot with X axis as c-time in seconds - range ~30 minutes
  Interpret as time
  plot as, eg, yyy-mm-dd hh:mm:ss

The X axis will be offset plotted in minutes, but will step by 6.66667 mintutes.  It should step by 5 or 10 minutes.
Comment 1 Andrew Walker 2004-10-26 19:14:00 UTC
This is essentially the same problem when using log-mode on an axis, which has always been present. Is this also something that we want to fix?
Comment 2 Netterfield 2004-10-26 20:05:05 UTC
I think the time thing should be fixed.  I want to take a crack at it myself 
if that's ok.... 

What is the log mode issue to which you refer?  The problem where the range is 
too small for log mode to make sense, so it reverts to something silly, or 
are you refering to something else?

cbn

On October 26, 2004 01:14 pm, Andrew Walker wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=92145
>
>
>
>
> ------- Additional Comments From arwalker sumusltd com  2004-10-26 19:14
> ------- This is essentially the same problem when using log-mode on an
> axis, which has always been present. Is this also something that we want to
> fix? _______________________________________________
> Kst mailing list
> Kst@kde.org
> https://mail.kde.org/mailman/listinfo/kst

Comment 3 Netterfield 2004-10-27 21:54:58 UTC
CVS commit by netterfield: 

BUG: 92145


  M +14 -13    kst2dplot.cpp   1.296


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.295:1.296
@@ -1513,15 +1513,4 @@ void Kst2DPlot::genAxisTickLabels(QPaint
   int i;
 
-  tp.maxWidth = 0.0;
-  tp.maxHeight = 0.0;
-  tp.labels.clear();
-  tp.delta = false;
-
-  setTicks(tp.tick, tp.org, Max, Min, bLog, isX);
-
-  tp.iLo = (int)((Min-tp.org)/tp.tick);
-  tp.iHi = (int)((Max-tp.org)/tp.tick)+1;
-  iShort = tp.iLo;
-
   if (isX && _isXAxisInterpreted) {
     double range;
@@ -1591,4 +1580,18 @@ void Kst2DPlot::genAxisTickLabels(QPaint
   }
 
+  tp.maxWidth = 0.0;
+  tp.maxHeight = 0.0;
+  tp.labels.clear();
+  tp.delta = false;
+
+  setTicks(tp.tick, tp.org, Max*scale, Min*scale, bLog, isX);
+  tp.tick/=scale;
+  tp.org/=scale;
+
+  tp.iLo = (int)((Min-tp.org)/tp.tick);
+  tp.iHi = (int)((Max-tp.org)/tp.tick)+1;
+  iShort = tp.iLo;
+
+
   //
   //  determine the values, and determine
@@ -1667,6 +1670,4 @@ void Kst2DPlot::internalAlignment(QRect&
   updateScale();
   getLScale(x_min, y_min, x_max, y_max);
-  //setTicks(XTick, Xorg, x_max, x_min, _xLog, true);
-  //setTicks(YTick, Yorg, y_max, y_min, _yLog, false);
   setBorders(xleft_bdr_px, xright_bdr_px, ytop_bdr_px, ybot_bdr_px,
              tpx, tpy, p, offsetX, offsetY);