QCustomPlot Discussion and Comments

can't use default QCustomPlot xAxis or yAxis, because at least one is invalid (has been deleted)Return to overview

hi,when i have used customPlot->plotLayout()->clear();how can i get the default axis back?

Just set them, as xAxis/yAxis/xAxis2/yAxis2 are just normal member pointers.

so for example:

customPlot->xAxis = customPlot->axisRect()->axis(QCPAxis::atBottom);