HI,..
How can i get bounding rect of plotting area? I mean how to get x,y,w,h of plotting area ?
Added after 5 minutes:
i've found something like canvasRect in qwt source code but i don't know how to get it
HI,..
How can i get bounding rect of plotting area? I mean how to get x,y,w,h of plotting area ?
Added after 5 minutes:
i've found something like canvasRect in qwt source code but i don't know how to get it
Last edited by alizadeh91; 12th August 2012 at 09:35.
What are you trying to do? If you want to translate pixels to the plot scale you can use QwtScaleMap QwtPlot::canvasMap ( int axisId )
No i just want width and x coordinates of plotting area
Added after 58 minutes:
i've uploaded following snapshot for better underestanding:
Untitled-1.jpg
I want to get the x and width which have shown on the above image
Last edited by alizadeh91; 14th August 2012 at 11:15.
I think it's pretty easy!! but i can't find that. no one knows how to do that?????!!!!
Added after 1 52 minutes:
I've found that it must be width of canvas. but when i get width of canvas is not actually equal to width of canvas. so i'm guessing that it's because it is in layout so the width is wrong. Plz someone guide me how to get width of plotting area
Last edited by alizadeh91; 15th August 2012 at 11:22.
plot->canvas()->contentsRect() gives you the coordinates in pixel coordinates, by QwtPlot::axisScaleDiv() you have the corresponding plot coordinates.
Uwe
alizadeh91 (20th August 2012)
Bookmarks