[Kst] plotGridLines order in Kst2DPlot

Ted Kisner tskisner.public at gmail.com
Tue Oct 25 23:38:34 CEST 2005


For some reason the grid lines are being drawn *before* the basecurves.  This 
is a problem for images, since the image covers up the gridlines.  Does 
anyone object if I move the grid plotting after the basecurves (but still 
before the axes)?  

-Ted

I'd like to make the following commit:

--- kst2dplot.cpp       (revision 474263)
+++ kst2dplot.cpp       (working copy)
@@ -2424,15 +2424,6 @@
     bt[i_bt++] = bench_time.elapsed();
 #endif

-    // must plot grid lines before axes
-    plotGridLines(p,
-                  tpx.tick, xleft_bdr_px, xright_bdr_px, x_orig_px, xtick_px, 
xtick_len_px, x_px,
-                  tpy.tick, ytop_bdr_px, ybot_bdr_px, y_orig_px, ytick_px, 
ytick_len_px, y_px);
-
-#ifdef BENCHMARK
-    bt_label[i_bt] = "Plot Grid Lines";
-    bt[i_bt++] = bench_time.elapsed();
-#endif
     // plot the legend now if its in the background
     if (!Legend->front()) {
       Legend->draw(&Curves, p, RelWinRegion,
@@ -2492,6 +2483,15 @@
     bt_label[i_bt] = "Plot Curves";
     bt[i_bt++] = bench_time.elapsed();
 #endif
+// must plot grid lines before axes
+    plotGridLines(p, tpx.tick, xleft_bdr_px, xright_bdr_px, x_orig_px, 
xtick_px,
+                  xtick_len_px, x_px, tpy.tick, ytop_bdr_px, ybot_bdr_px, 
y_orig_px,
+                  ytick_px, ytick_len_px, y_px);
+
+#ifdef BENCHMARK
+    bt_label[i_bt] = "Plot Grid Lines";
+    bt[i_bt++] = bench_time.elapsed();
+#endif
     p.setPen(QPen(_foregroundColor, penWidth));
     plotAxes(p, RelPlotRegion,
         tpx, xleft_bdr_px, xright_bdr_px, x_orig_px, xtick_px, xtick_len_px, 
x_px,


More information about the Kst mailing list