Hello,

I have to plot curves using QDateTime as x-axis. I'm using setAxisScaleDraw and using my return as below:

Qt Code:
  1. return QDateTime::fromTime_t( v ).toString( "hh:mm:ss" );
To copy to clipboard, switch view to plain text mode 

It's working fine and plotting everything right. I added a QwtPlotZoomer to my software to perform the zoom possibility, and it's working also fine.

The problem is: when I try to zoom a small part of the curve, for example, if I want to zoom some part that is less than one minute, my x-axis keeps with one minute size and my curve goes to the center of the screen, it doens't use the whole plot area.

Example:

The figure below, I have current and voltage plotted, and I zoomed just one part, represented using blue arrows.

firstZoom.jpg

The figure below is the result of the first zoom, showed at figure above:

secondZoom.jpg

It's possible to see that QwtPlotZoomer is working fine and also the scaleDraw. I zoomed a big part, then it works fine. The third figure (figure below) shows the result of the last zoom (figure above):

thirdZoom.jpg

And then I zoomed again the last figure, just a small part. And I get my problem, my last zoom is just 3 seconds, but the x-axis keeps with almost one minute and my graph goes to the center of the plot area (figure below):

fourthZoom.jpg

My question: is there a limit for the scaleDraw? I tried to use milliseconds, but I couldn't find a way to do that, I don't know exactly how it works. I would like to use always the whole plotting area, and don't have this small piece of curve. Someone has any ideia why it's happening that?

I hope someone can understand my problem and help me, if you have any questions I can try to explain again.