Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Canvas mouse tracking box location

39 views
Skip to first unread message

MBaz

unread,
Nov 18, 2020, 9:14:28 PM11/18/20
to
The documentation and the demos on gnuplot's webpage indicate that the mouse-tracking box in a canvas plot should appear on the bottom of the plot.

However, when I create such a plot myself, I see the box on the left of the plot. Furthermore, the grid button does not work, and I see a button with sort of a double "A" that is not there in the demos.

Here is a screenshot that shows what I see: https://i.imgur.com/7DHeg9A.png

To reproduce (I'm using gnuplot 5.4), run these commands:

set term canvas mousing
set output 'test.html'
plot sin(x)
set output

and then open 'test.html' in a web browser.

Does anyone know what is happening here, and how can I obtain plots as shown on the demos and described in the documentation?

MBaz

unread,
Nov 18, 2020, 9:55:59 PM11/18/20
to
On Wednesday, November 18, 2020 at 9:14:28 PM UTC-5, MBaz wrote:
> The documentation and the demos on gnuplot's webpage indicate that the mouse-tracking box in a canvas plot should appear on the bottom of the plot.

Here is what gnuplot outputs with the commands given above: https://gist.github.com/mbaz/c6106679b7c01ce58ab422a5b5dbd025

MBaz

unread,
Nov 19, 2020, 1:43:22 PM11/19/20
to
I have found that there are several different classes in the mousebox CSS, and `mbleft` is the one used in the canvas html. I was hopeful that changing it manually to `mbunder` would help, but it didn't.

I also saw the example canvas demo plots for gnuplot 5.5 (unfortunately, the 5.4 canvas demos are 404). Besides much cleaner html, it uses the `mbunder` class, and disables the "text zoom" button.

Karl Ratzsch

unread,
Nov 19, 2020, 2:27:10 PM11/19/20
to
Am 19.11.2020 um 03:14 schrieb MBaz:
> To reproduce (I'm using gnuplot 5.4), run these commands:
>
> set term canvas mousing
> set output 'test.html'

Hm, the output html doesn't work at all on firefox/win7

The firefox web console complains with the following, anybody know
what's wrong there? The paths are correct. Can't be the
slash/backslash mixture, can it?


Laden fehlgeschlagen für das <script> mit der Quelle "c:\Program
Files\gnuplot54\share/js/canvastext.js". test.html:6:1
Laden fehlgeschlagen für das <script> mit der Quelle "c:\Program
Files\gnuplot54\share/js/gnuplot_common.js". test.html:7:1
Laden fehlgeschlagen für das <script> mit der Quelle "c:\Program
Files\gnuplot54\share/js/gnuplot_dashedlines.js". test.html:8:1
Laden fehlgeschlagen für das <script> mit der Quelle "c:\Program
Files\gnuplot54\share/js/gnuplot_mouse.js". test.html:9:1
Uncaught ReferenceError: gnuplot is not defined
<anonymous> file:///C:/Users/ratzsch/Documents/gpmouse/test.html:10
test.html:10:2
Uncaught ReferenceError: gnuplot is not defined
<anonymous> file:///C:/Users/ratzsch/Documents/gpmouse/test.html:13
test.html:13:1
Die Zeichenkodierung des HTML-Dokuments wurde nicht deklariert. Das
Dokument wird in manchen Browser-Konfigurationen mit verstümmeltem
Text dargestellt, wenn das Dokument Zeichen außerhalb des
US-ASCII-Bereichs enthält. Die Zeichenkodierung der Seite muss im
Dokument oder Transferprotokoll deklariert werden. test.html
Uncaught ReferenceError: gnuplot is not defined
gnuplot_canvas
file:///C:/Users/ratzsch/Documents/gpmouse/test.html:36
onload file:///C:/Users/ratzsch/Documents/gpmouse/test.html:1

MBaz

unread,
Nov 19, 2020, 9:20:13 PM11/19/20
to
I was able to place the mousebox under the plot by copying the layout from gnuplot's demo page. This works: mouse zoom, mouse tracking, printing and clearing coordinates with the left and right mouse buttons, and the zoom reset/restore buttons. This doesn't work: grid on/off button, turning plots on/off.
0 new messages