Hi all i am trying to plot the line chart based on Gyro values so some times gyro values might give the wrong data in that condition alone i need to draw a different line ( might be dotted ) else it should be a straight line with some thick ness . so this is something similar to

https://www.qcustomplot.com/index.php/support/forum/122

but instead i need to draw different style of line .
below is the code how i declared

void Form_MyCharts::SetUp_MyCustomPlot_For_gyro1()
{

    ui->Plot_Chart1->addGraph();
    ui->Plot_Chart1->graph(0)->setScatterStyle(QCPScatterStyle::ssCrossCircle);
    //ui->customPlot->graph(0)->setLineStyle(QCPGraph::lsNone);
    ui->Plot_Chart1->graph(0)->setPen(QPen(Qt::blue)); // line color blue for first graph



    ui->Plot_Chart1->xAxis->setLabel(" Gyro 1  ");

    ui->Plot_Chart1->setInteractions( ui->Plot_Chart1->interactions() | QCP::iRangeDrag);
    ui->Plot_Chart1->xAxis->setRangeLower(0);

    // ui->Plot_Chart1->xAxis->setRange(0, DataPointsVecXY.size(), Qt::AlignRight);

    connect(ui->Plot_Chart1->xAxis, SIGNAL(rangeChanged(QCPRange)), this, SLOT(onXRangeChanged(QCPRange)));
    connect(ui->Plot_Chart1->yAxis, SIGNAL(rangeChanged(QCPRange)), this, SLOT(onYRangeChanged(QCPRange)));

void Form_MyCharts::Update_The_Plotting_For_Gyro1()
{
    HigherRangeBoundX=DataPointsXY.size();
    HigherRangeBoundY=*std::max_element(DataPointsX.constBegin(), DataPointsX.constEnd());

    lowerRangeBound=*std::min_element(DataPointsX.constBegin(), DataPointsX.constEnd());

    //ui->customPlot1->graph(0)->setData(DataPointsVecX.at(0),DataPointsVecY.at(0));

    // configure right and top axis to show ticks but no labels:
    // (see QCPAxisRect::setupFullAxesBox for a quicker method to do this)

    ui->Plot_Chart1->xAxis->setVisible(true);
    ui->Plot_Chart1->xAxis->setTickLabels(true);
    ui->Plot_Chart1->yAxis->setVisible(true);
    ui->Plot_Chart1->yAxis->setTickLabels(false);

    ui->Plot_Chart1->axisRect()->setupFullAxesBox();

    // pass data points to graphs:
    ui->Plot_Chart1->graph()->setData(DataPointsXY,DataPointsX);

    // let the ranges scale themselves so graph 0 fits perfectly in the visible area:
    ui->Plot_Chart1->graph()->rescaleAxes();

    // Note: we could have also just called customPlot->rescaleAxes(); instead
    // Allow user to drag axis ranges with mouse, zoom with mouse wheel and select graphs by clicking:
    ui->Plot_Chart1->setInteractions(QCP::iRangeDrag  | QCP::iRangeZoom| QCP::iSelectPlottables); //
    ui->Plot_Chart1->replot();
    ui->Plot_Chart1->update();
}
void Form_MyCharts::on_pbtn_Update_clicked()
{
    unsigned int MySize=0;
    MySize=DataPointsXY.size();

    double DData=MySize;
    double DDataYAxis=DataPointsX.last()+10;

    DataPointsXY.append(MySize);
    DataPointsX.append(DDataYAxis);


    qDebug()<<" Size "<<MySize;
    qDebug()<<" XAXIs "<<DataPointsXY;
    qDebug()<<" Y AXIS "<<DataPointsX;


    HigherRangeBoundX=DataPointsXY.size();
    HigherRangeBoundY=*std::max_element(DataPointsX.constBegin(), DataPointsX.constEnd());

    lowerRangeBound=*std::min_element(DataPointsX.constBegin(), DataPointsX.constEnd());


    ui->Plot_Chart1->graph(0)->addData(DData,DDataYAxis);

    ui->Plot_Chart1->graph(0)->rescaleAxes();





    ui->Plot_Chart1->xAxis->setRange(0,MySize);
    //ui->Plot_Chart1->xAxis->setRange(0, DataPointsVecXY.size(), Qt::AlignRight);
    ui->Plot_Chart1->replot();
    ui->Plot_Chart1->update();

    ui->Plot_Chart1->xAxis->setRangeLower(0);

    //    ui->Plot_Chart1->graph(0)->setPen(QPen(Qt::blue));

    //ui->Plot_Chart1->xAxis->setTick

}



}

Can any one give me a hint how to make this to happen , As am newbie to qcustomplot and qt .