qt - Qwt QwtScaleEngine -
i have qwtplot. plot autoscalable limit distention avoid plot extended between 46.5 , 47.5. example, plot wasn't extented on less of 5 unites.
i know must use qwtscaleengine don't how ?
seems, have no need use qwtscaleengine try kind of code:
plot=new qwtplot(parent); plot->setaxisautoscale(qwtplot::yleft,false); plot->setaxisscale(qwtplot::yleft,minyborder,maxyborder,0);
qwtscaleengine better in use formatting like:
class timescaledraw:public qwtscaledraw{ public: timescaledraw(qstring fmt):format(fmt){} virtual qwttext label(double v) const{ return (qdatetime::frommsecssinceepoch(floor(v))).tostring(format); } private: const qstring format; };
Comments
Post a Comment