Is there a way to scale the legend when exporting to a pdf file?
I’m trying to allow the user to scale the canvas during export but the legends always remain the same size when I do this. I am using Qt 4.8.4 and qwt 6.0.0-rc5. To scale the canvas I call QwtPlotRenderer::render. In an export preview window, the user can move one of two sliders that change the plot rectangle size that gets passed into renderer.
Ideally I would like to be able to size the legend independently of the canvas. Any hints about how to go about doing this? I like how the plot screen looks and works but just need to deal with more flexibility when exporting & printing. For the QwtPlot, I set the legend ratio when adding the legends to 0.8.
I’ve played around with calling QwtPlotLayout::setLegendRatio() before calling renderer but this had no effect. I also tried overriding QwtLegend::sizeHint() which did make the font smaller but still laid out the plot with the same amount of space reserved for the legend. This just resulted in more blank space.
Thanks in advance for any help.
Bookmarks