orignihn
16th May 2011, 19:05
Hello,
I'm trying to include a legend with multiple columns on top of my plot, but only one ever appears.
Here's the code for adding a new data set (part of a member function of a class that inherits QwtPlot):
QwtPlotCurve* curve = new QwtPlotCurve(var->get_name());
curve->attach(this);
plotLayout()->setLegendPosition(QwtPlot::TopLegend);
but every time I add a curve, the legend gets a new item directly underneath the old one. I have no other legend-related code anywhere, and there is plenty of space for 2-3 more legend items before adding another row. I'm using Qwt-5.2.1.
How do I get legend items to appear in multiple columns above my plot?
Thanks,
Tom
I'm trying to include a legend with multiple columns on top of my plot, but only one ever appears.
Here's the code for adding a new data set (part of a member function of a class that inherits QwtPlot):
QwtPlotCurve* curve = new QwtPlotCurve(var->get_name());
curve->attach(this);
plotLayout()->setLegendPosition(QwtPlot::TopLegend);
but every time I add a curve, the legend gets a new item directly underneath the old one. I have no other legend-related code anywhere, and there is plenty of space for 2-3 more legend items before adding another row. I'm using Qwt-5.2.1.
How do I get legend items to appear in multiple columns above my plot?
Thanks,
Tom