25 Jul 20:01
Alignment of QwtPlotScaleItem with axis
From: Joey Mukherjee <joey <at> swri.edu>
Subject: Alignment of QwtPlotScaleItem with axis
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-07-25 18:04:53 GMT
Subject: Alignment of QwtPlotScaleItem with axis
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-07-25 18:04:53 GMT
I use QwtPlotScaleItem to draw inner axes tick marks and when the plot first comes up, the inner tick marks are not aligned with the outer tick marks. If I resize the plot a little, the tick marks correct themselves. Does anyone know what I might be doing wrong? I tried modifying one of the examples to match what I am doing, and was unsuccessful in duplicating the problem. Here's essentially the code I am using: + QwtPlotScaleItem *scaleItem = new QwtPlotScaleItem (); + scaleItem->setAlignment (QwtScaleDraw::TopScale); + scaleItem->setAxis (QwtPlot::xBottom, QwtPlot::yLeft); + scaleItem->setBorderDistance (0); + scaleItem->scaleDraw ()->setTickLength (QwtScaleDiv::MajorTick, 8); + scaleItem->scaleDraw ()->setTickLength (QwtScaleDiv::MinorTick, 4); + scaleItem->scaleDraw ()->enableComponent (QwtAbstractScaleDraw::Labels, false); + scaleItem->attach (this); Naturally, this is part of a bigger program so I am sure it is an order of operations type of thing, but I am lost at what else I can check. Does anyone have ideas of where to look or what else I can set or call which might help? Thanks, Joey -------------------------------------------------------------------------(Continue reading)
RSS Feed