Hi !
While working on my wxwidgets terminal, I have found the following
strange behaviour :
Terminals have two commands _graphics and _text which are designed to
begin and to finish plot commands :
_graphics
_move
_vector
...
_text
This scheme is adapted to mouse so that you can hit <B2> to annotate the
graph, without redrawing it entirely :
_graphics
_move
_vector
...
_text
<B2> clicked
_move
_vector
_put_text
_text
As you can see, _graphics is not called when <B2> is clicked. The
commands following the click are only drawing a cross and its
coordinates. I conclude that _graphics should clear the plot, and if
_graphics is not called, the plot is completed.
However, when I rotate a pm3d plot with the mouse in my wxwidgets
terminal, and in particular when samples are numerous (tried with set
isosamples 200; splot x**2*y**2 with pm3d), it seems that _graphics is
not always called. Here is what I get by echoing "text" and "graphics"
when the corresponding functions are called when rotating the former
surface :
Graphics
Text
Graphics
Text
Text
Graphics
Text
Graphics
Text
Graphics
Text
Text
And, as a consequence, I can see two plots in the window.
Here is a screenshot to illustrate it : http://tipote.free.fr/wxt10.png
I have digged into the code to see what can trigger such a problem, but
can't find anything suspect... term_start_plot() in term.c is always
started properly, but sometimes doesn't call *term->graphics(). It
implies that term_graphics has not been set to true, which should have
been done right after the last *term->text() call... All those calls are
synchronous, done by a unique thread... How can this happen ?
Can somebody give me a piece of help ? ;-)
Thanks !
Timoth=E9e Lecomte
|