Re: how to let autoscale leave a border around the data
Brought to you by:
rathmann
From: Matthias P. <mat...@gm...> - 2010-08-25 07:18:14
|
Uwe Rathmann schrieb: >> I am using autoscale on x and y axis. However this means that the >> plotted lines touch all borders of the plot window exactly. >> I would rather like have a free space of 10% of the scale range on each >> side of the axis. >> > > See QwtScaleEngine::setMargins(): > http://qwt.sourceforge.net/class_qwt_scale_engine.html#ed2ab1fc105a25fa97bbecf4b2f541a7 > This margin is in absolute values of the data. right? Since the data can change rapidly in orders of magnitude I would rather have something in terms of percentage of the whole data range. Would it be possible to derive from QwtLinearScaleEngine and implement that? It seems that the ScaleEngine has no knowledge about the data itself. They only get called automatically with autoscale(...). So where would you implement my approach? Matthias |