I am trying to call setInterval() after I initialize my QwtRasterData for a QwtPlotSpectrogram object. Whenever I call setInterval() when I initialize my QwtRasterData object, the color map is created correctly. However, if I call setInterval() again at a later point, the color map does not update. How do I get the color map to be redrawn? I've tried to call repaint() and replot() on the plot to no avail. Any help would be much appreciated!
{
setInterval(Qt::ZAxis, QwtInterval(-40, 40)); // Updates color map values
}
// This function is called later when I am appending data to my data matrix
void QWSpectraData::append(const QVector<float> & data, float height)
{
//...
setInterval(Qt::ZAxis, QwtInterval(-100, 100)); // Does not update color map values
}
QWSpectraData::QWSpectraData() : QwtRasterData()
{
setInterval(Qt::ZAxis, QwtInterval(-40, 40)); // Updates color map values
}
// This function is called later when I am appending data to my data matrix
void QWSpectraData::append(const QVector<float> & data, float height)
{
//...
setInterval(Qt::ZAxis, QwtInterval(-100, 100)); // Does not update color map values
}
To copy to clipboard, switch view to plain text mode
Bookmarks