Kempe, Lars (Lars | 15 Aug 15:49
Favicon

AW: qwt frage

Hallo Uwe,
danke fuer die Antwort.

 
> Hallo Lars,
> 
> > ich habe mir als erstes beispiel den real-time plot adaptiert, sehe 
> > aber, dass diese zeichnung ziemlich langsam wird.
> 
> Das Beispiel zeigt wie man inkrementell zeichnet ( also nur 
> die zusätzlichen Punkte ). Das funktioniert mit Qt3 auf allen 
> Plattformen - mit Qt4 aber nur dort, wo 
> QPaintEngine::PaintOutsidePaintEvent unterstützt wird ( z.B. 
> X11 aber nicht Windows ). Ohne das 
> QPaintEngine::PaintOutsidePaintEvent Flag ist das Beispiel 
> aber eher wertlos.
> 
> Daher ist es erst einmal entscheidend zu wissen welche 
> Zielplattform ihr habt.

Ich nutze QT3.

> 
> > dazu verwendete ich auch die
> > datenspeicherung aus dem qwt beispiel. da die werte als kurven 
> > dargestellt werden sollen und nicht als punkte, funktioniert leider 
> > nicht das draw(from, to).
> 
> Warum ?

(Continue reading)

Uwe Rathmann | 17 Aug 20:09

Re: AW: qwt frage

Hi Lars,

this is an list in English !

> > > dazu verwendete ich auch die
> > > datenspeicherung aus dem qwt beispiel. da die werte als kurven
> > > dargestellt werden sollen und nicht als punkte, funktioniert leider
> > > nicht das draw(from, to).
> >
> > Warum ?
>
> gute frage, also prinzipiell funktioniert es, die punkte werden gezeichnet,
> leider nicht die linien ...

When you want to paint incrementally with QwtPlotCurve::draw(from, to) it's 
not enough to draw the additional point to get the connecting line too. You 
also need to repaint the previous one ! I guess this will give you the result 
you need with an acceptable performance. 

You can also try to disable the canvas pixmap cache ( 
canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false); ). This will 
improve the performance of your "realtime" painting, but you might have to 
pay with additional replots in situations, where repainting the pixmap cache 
would be enough.

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
(Continue reading)

Kempe, Lars (Lars | 18 Aug 10:28
Favicon

AW: AW: qwt frage

 He Uwe,

> >
> > gute frage, also prinzipiell funktioniert es, die punkte werden 
> > gezeichnet, leider nicht die linien ...
> 
> When you want to paint incrementally with 
> QwtPlotCurve::draw(from, to) it's not enough to draw the 
> additional point to get the connecting line too. You also 
> need to repaint the previous one ! I guess this will give you 
> the result you need with an acceptable performance. 

with the well known replot() or is there another way?

I tried the data plot again with some changes and I think it will work.

> You can also try to disable the canvas pixmap cache ( 
> canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, 
> false); ). This will improve the performance of your 
> "realtime" painting, but you might have to pay with 
> additional replots in situations, where repainting the pixmap 
> cache would be enough.

cache was false, this tipp I found at forum too

thanks 

Lars

-------------------------------------------------------------------------
(Continue reading)

Uwe Rathmann | 18 Aug 11:23

Re: AW: AW: qwt frage

On Monday 18 August 2008 10:28, Kempe, Lars (Lars) wrote:

> > When you want to paint incrementally with
> > QwtPlotCurve::draw(from, to) it's not enough to draw the
> > additional point to get the connecting line too. You also
> > need to repaint the previous one ! I guess this will give you
> > the result you need with an acceptable performance.
>
> with the well known replot() or is there another way?

replot is not necessary, its enough to do: curve->draw(numPoints - 2, 
numPoints - 1);

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Kempe, Lars (Lars | 18 Aug 11:40
Favicon

AW: AW: AW: qwt frage


> 
> On Monday 18 August 2008 10:28, Kempe, Lars (Lars) wrote:
> 
> > > When you want to paint incrementally with 
> QwtPlotCurve::draw(from, 
> > > to) it's not enough to draw the additional point to get the 
> > > connecting line too. You also need to repaint the 
> previous one ! I 
> > > guess this will give you the result you need with an acceptable 
> > > performance.
> >
> > with the well known replot() or is there another way?
> 
> replot is not necessary, its enough to do: 
> curve->draw(numPoints - 2, numPoints - 1);

unfortunatly, this did not work too

i implemented zoomer at this canvas (from begin on) and if I press the
right mouse button the curve is available (I assume ther is a replot()
inside, but not checked yet).

mh, will check further

lars

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
(Continue reading)

Uwe Rathmann | 18 Aug 12:26

Re: AW: AW: AW: qwt frage

On Monday 18 August 2008 11:40, Kempe, Lars (Lars) wrote:

> > replot is not necessary, its enough to do:
> > curve->draw(numPoints - 2, numPoints - 1);
>
> unfortunatly, this did not work too

Then start your debugger and step into QwtPlotCurve::draw:

QwtPlotCurve::draw calls drawCurve() and drawSymbols(). drawCurve(from, to) 
draws the lines between the specified points.

It should be easy to see what's going wrong.

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Kempe, Lars (Lars | 21 Aug 11:36
Favicon

real time plot - axis

Uwe,
I investigated further ...

it works in normal well known real-time (incrementalplot.cpp) example
way:
- create the plot win 
- give the data
- draw the last points ...

my problem was the x-axis

I implement a x-axis change. I will only see 5 seconds from plot but
need the hole data for scrolling in future.
So i changed the x-axis with:

setAxisScale(QwtPlot::xBottom, x-4, x+1);

after that, the curve will not be drawn. (my meaning is to replot the
win after changing the scale but than its to slow)
If i use the default way:

    setAxisTitle(QwtPlot::xBottom, "Time [sec]");
    setAxisTitle(QwtPlot::yLeft, "Value []");
    setAxisScale(xBottom, 0, 100);
    setAxisScale(yLeft, 0, 40);

    setAxisAutoScale(xBottom);

the draw(from, to) will work.
But I need the implementation with this x-axis behaviour.
(Continue reading)

Kempe, Lars (Lars | 21 Aug 16:34
Favicon

AW: real time plot - axis

http://www.eeepc.de/thread.php?postid=5750#post5750 

> -----Ursprüngliche Nachricht-----
> Von: qwt-interest-bounces <at> lists.sourceforge.net 
> [mailto:qwt-interest-bounces <at> lists.sourceforge.net] Im 
> Auftrag von Kempe, Lars (Lars)
> Gesendet: Donnerstag, 21. August 2008 11:37
> An: List for both Qwt users and developers
> Betreff: real time plot - axis
> 
> Uwe,
> I investigated further ...
> 
> it works in normal well known real-time (incrementalplot.cpp) example
> way:
> - create the plot win
> - give the data
> - draw the last points ...
> 
> my problem was the x-axis
> 
> I implement a x-axis change. I will only see 5 seconds from 
> plot but need the hole data for scrolling in future.
> So i changed the x-axis with:
> 
> setAxisScale(QwtPlot::xBottom, x-4, x+1);
> 
> after that, the curve will not be drawn. (my meaning is to 
> replot the win after changing the scale but than its to slow) 
> If i use the default way:
(Continue reading)

Kempe, Lars (Lars | 21 Aug 16:37
Favicon

sorry wrong !!

 sorry was wrong mailing list ..
:)

> -----Ursprüngliche Nachricht-----
> Von: Kempe, Lars (Lars) 
> Gesendet: Donnerstag, 21. August 2008 16:34
> An: 'List for both Qwt users and developers'
> Betreff: AW: real time plot - axis
> 

> > -----Ursprüngliche Nachricht-----
> > Von: qwt-interest-bounces <at> lists.sourceforge.net
> > [mailto:qwt-interest-bounces <at> lists.sourceforge.net] Im Auftrag von 
> > Kempe, Lars (Lars)
> > Gesendet: Donnerstag, 21. August 2008 11:37
> > An: List for both Qwt users and developers
> > Betreff: real time plot - axis
> > 
> > Uwe,
> > I investigated further ...
> > 
> > it works in normal well known real-time 
> (incrementalplot.cpp) example
> > way:
> > - create the plot win
> > - give the data
> > - draw the last points ...
> > 
> > my problem was the x-axis
> > 
(Continue reading)

Uwe Rathmann | 21 Aug 18:35

Re: real time plot - axis

On Thursday 21 August 2008 11:36, Kempe, Lars (Lars) wrote:

> setAxisScale(QwtPlot::xBottom, x-4, x+1);

As soon as you change the scales, the whole plot needs to be repainted. I 
don't believe, that this is different in your previous implementation.

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane