Hi @J-Hilk,
thanks for your reply and your suggestions. I was looking the Qwt myself yesterday and I used it, as you suggested, to create the charts as I wanted. Next following the function InitializeCharts() at my first comment but with the Qwt module/library now
#include <QwtPlot>
#include <QwtPlotScaleItem>
void InitializeCharts()
{
// pan
ui->gimbalPositionPanQwtPlot->setTitle("Pan Position");
ui->gimbalPositionPanQwtPlot->enableAxis(QwtAxis::YLeft, false);
ui->gimbalPositionPanQwtPlot->enableAxis(QwtAxis::XBottom, false);
ui->gimbalPositionPanQwtPlot->enableAxis(QwtAxis::YLeft, false);
ui->gimbalPositionPanQwtPlot->enableAxis(QwtAxis::XBottom, false);
ui->gimbalPositionPanQwtPlot->setAxisScale(QwtAxis::YLeft, -90.0, 90.0);
ui->gimbalPositionPanQwtPlot->setAxisScale(QwtAxis::XBottom, -90.0, 90.0);
QwtPlotScaleItem *panVerticalAxisScale = new QwtPlotScaleItem(QwtScaleDraw::RightScale, 0.0);
panVerticalAxisScale->attach(ui->gimbalPositionPanQwtPlot);
QwtPlotScaleItem *panHorizontalAxisScale = new QwtPlotScaleItem(QwtScaleDraw::BottomScale, 0.0);
panHorizontalAxisScale->attach(ui->gimbalPositionPanQwtPlot);
// tilt
ui->gimbalPositionTiltQwtPlot->setTitle("Tilt Position");
ui->gimbalPositionTiltQwtPlot->enableAxis(QwtAxis::YLeft, false);
ui->gimbalPositionTiltQwtPlot->enableAxis(QwtAxis::XBottom, false);
ui->gimbalPositionTiltQwtPlot->enableAxis(QwtAxis::YLeft, false);
ui->gimbalPositionTiltQwtPlot->enableAxis(QwtAxis::XBottom, false);
ui->gimbalPositionTiltQwtPlot->setAxisScale(QwtAxis::YLeft, -90.0, 90.0);
ui->gimbalPositionTiltQwtPlot->setAxisScale(QwtAxis::XBottom, 0.0, 90.0);
QwtPlotScaleItem *tiltVerticalAxisScale = new QwtPlotScaleItem(QwtScaleDraw::RightScale, 0.0);
tiltVerticalAxisScale->attach(ui->gimbalPositionTiltQwtPlot);
QwtPlotScaleItem *tiltHorizontalAxisScale = new QwtPlotScaleItem(QwtScaleDraw::BottomScale, 0.0);
tiltHorizontalAxisScale->attach(ui->gimbalPositionTiltQwtPlot);
}
The output would look like the following
0936b8d6-3d0d-49ec-8f58-ed1cbd7b9653-image.png
which is close enough for me of what I wanted to achieve.
Thanks again @J-Hilk for your time replying to my issue.
Kind regards,
Stavros