1 Attachment(s)
Plotting does not start from the extreme left (x-axis) and extreme bottom (y-axis)
I am new to qwt and needs help on the following issue.
I am using QWTPlot. It works fine normally when I plot data. I see proper scale division.
However in certain conditions, when I zoom and unzoom the plot it leaves some space on both the axis before start painting.
The start of the axis is shifted (its not margin, margin is set to 0) as seen in the attached image.
Appreciate any pointers to resolve the issue. What property could I modify to get the proper plot behavior?Attachment 12847
Thanks
SPanara
1 Attachment(s)
Re: Plotting does not start from the extreme left (x-axis) and extreme bottom (y-axis
It seems canvas margin is getting screwed up.
Attached is the image when I set canvas background to blue. I see the blue stripes on the left and bottom.
I also see the first digit of one of the y-axis label (10000 ft) is distorted.
I tried setting the canvas margin to 0 but did not help.
Attachment 12848
Re: Plotting does not start from the extreme left (x-axis) and extreme bottom (y-axis
Code:
plot->plotLayout()->setAlignCanvasToScale( true );
Uwe
Re: Plotting does not start from the extreme left (x-axis) and extreme bottom (y-axis
I used setAlignCanvasToScale(true) but did not help
Re: Plotting does not start from the extreme left (x-axis) and extreme bottom (y-axis
Then post the code of a small and compilable demo.
Uwe
Re: Plotting does not start from the extreme left (x-axis) and extreme bottom (y-axis
Thanks for the quick response!
I am working on client application and its bit complex... will try to post the snippet of code.
The detailed scenario is as follows,
I have multiple plots open in QTabWidget. (ie. Plot A and Plot B).
x-axis is displaying time series and y-axis height in meter
I am on the tab for plot A. I zoom the plot and click on tab to view plot B (Plot A is in zoom condition only)
Now I modify the y-axis scalling to show height in feet.
When the unit is modified, I unzoom all the plots if zoomed (here plot A and B) and set the height range for feet.
At this point, plot-B (which is visible now) works fine and adjust according to unit change.
But, if I click on the Tab to view plot A (which was not visible when unit changed) does show the problem I explained earlier. It does change the height scalling as per the unit change. Only plotting is issue
This happens all the time for the plot which is not displayed when unit change happens.
Afterwards, if I zoom the plot (where I have issue in plotting) and unzoom ... It show the expected plot and issue disappears
Are there any specific properties for which if it matters if plot is in foreground or background?
Thanks
SPanara