Hi, Uwe
How can I force the axis' backbone extend to align with the edge of the canvas?
By default, it seems the axis' backbone is aligned with the plot grid.
Nicho
Hi, Uwe
How can I force the axis' backbone extend to align with the edge of the canvas?
By default, it seems the axis' backbone is aligned with the plot grid.
Nicho
Check the examples - f.e spectrogram.
Uwe
Uwe,
Again, I meet two questions about plot matrix.
First one:
I have used this function to align the backbone:
plotLayout()->setAlignCanvasToScales( true );But that will make the spacing between columns be different.
I guess that is because the far right axis label of some plots is too long and causes the different spacing, right?
And is there a way to fix it?
Another question :
The size of each plot is different from each other.
Is there a way to make them be the same size?
Thanks a lot.
Nicho
Last edited by Nicho; 2nd July 2013 at 10:08. Reason: updated contents
For both questions the same answer: you have to remove the grid layout that is used in the PlotMatrix class and implement a new method
Qt Code:
{ // calculate and assign the geometries of your plots here ... }To copy to clipboard, switch view to plain text mode
In PlotMatrix::resizeEvent() and some other places that have an effect on the size of your plots you have to call:
As you probably want to have the same size for the canvases ( not the plots ! ) you have to subtract the sizeHints() of the scales, legends and titles ( QwtPlot is a composite widget ! ).Qt Code:
layoutPlots( contentsRect() );To copy to clipboard, switch view to plain text mode
Uwe
Uwe,
In plot matrix, the width of the plots in the far left column is smaller than the others.
And in my application, in some situation, the height also has this problem.
Seeing the pic below:
prob-3.jpg
I wish, yes, maybe the canvases to have the same size in pixel.
I have thought the grid layout will layout all the plots as average size.
But now it seems not.
I don't know why.
And how to subtract the sizeHints() of such as scales?
Can you take scales as an example to tell me what should I code in the sizeHints() when I subtract it?
Thank you.
Nicho
any help ?
Could Uwe give me a hand for my question in detail?
My previous answer is still valid - it is exactly what you have to do.
Uwe
Bookmarks