QwtPlotSpectrogram, don't draw from scratch!
Unsolved
General and Desktop
-
I want to draw a spectrogram periodically, which means that data come over time, and i want to just add columns to the previous graph.
What i did is to declare a
QwtPlotSpectrogram * spectrogram
instance, and i use thesetData()
function where i pass aSpectrogramData
instance:class SpectrogramData : public QwtRasterData { private: std::vector<std::vector<double>> data; public: SpectrogramData(int height, int width); ~SpectrogramData(); virtual double value(double x, double y) const; };
spectrogram->setData(spectrogram_data);
When new data come, i add them to the
data
structure, and callreplot()
in theQwtPlot
instance that theQwtSpectrogram
is attached to.Because the spectrogram will ultimately have about 700*22000 size, i don't know what does
replot()
do. Is there a way to tell qwt to only plot a certain column of data or region or rectangular or something? -
Hi,
That's a question you should ask to the Qwt authors.