1 Attachment(s)
Having xBottom label problem in my trend, don't understand setMinBorderDist usage
Hi everyone!
As suggested in cpuplot example, i've used setMinBorderDist trying to avoid the "jumping canvas" effect in my trend. CpuPlot example have vertical labels for the bottom axis. My trend display labels horizontally. So i used this variation of the cpuplot example code:
QwtScaleWidget *scaleWidget = plot->axisWidget(QwtPlot::xBottom);
const int fmw = QFontMetrics(scaleWidget->font()).width("00:00:00");
scaleWidget->setMinBorderDist(0, fmw / 2);
ok, jumpin' effect does not appear anymore but I get a problem on the right of xBottom axis (see attachment), labels & axis values go outside the plot area, also curves go outside.
I really don't get the correct usage of setMinBorderDist, maybe this problem come from the patch for multiple yAxis...
some help? :confused:
Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage
Obviously you are not using an official Qwt release, right ?
Uwe
Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage
Quote:
Originally Posted by
Uwe
Obviously you are not using an official Qwt release, right ?
Uwe
QWT 5.2.1 + multiple axis patch (5.0.x) :eek:
Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage
Quote:
Originally Posted by
driven
QWT 5.2.1 + multiple axis patch (5.0.x) :eek:
I'm afraid, that you are alone with layout problems in external patches.
Uwe
Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage
Quote:
Originally Posted by
Uwe
I'm afraid, that you are alone with layout problems in external patches.
Uwe
Yeah Uwe, I know...
But Am I missing official patch for multiple axis? Are there other ways to achieve the same result without external patches?
Anyway Uwe, thanks for QWT! :)
Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage
Quote:
Originally Posted by
driven
Are there other ways to achieve the same result without external patches?
No, this feature is simply not supported by Qwt.
As you have ported the patch to 5.2.1 please upload it ( preferable with the layout problem fixed ). I know that a couple users stay with Qwt 5.0 because of this patch.
Uwe
Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage
Quote:
Originally Posted by
Uwe
As you have ported the patch to 5.2.1 please upload it ( preferable with the layout problem fixed ). I know that a couple users stay with Qwt 5.0 because of this patch.
I've simply applied the patch 5.0.x to 5.2.1 and everything works fine for me (except for the layout problems). I know, I should not do such thing (is not the right way), but my project is still in a "experimental" status, so I do not care about problems regarding wrong patch version at this time. For the future I'll surely have the time to make things work perfectly, so be patient! ;)