your code can't work. why do you clear the points-vector in each loop? I already gave you the solution how to fix that...
remember:
Qt Code:
QPolygonF polygon; for(unsigned int i=0; i<10; i++) polygon << function(); curve->setSamples(polygon);To copy to clipboard, switch view to plain text mode
and you don't need to call "myplot->show()" in plotValuesFromFunction, it's sufficient to do that once in the constructor.
PS: you already opened one thread for this topic. it's very bad style to create a second thread only because nobody answers in your first thread.
Bookmarks