• Canvas mouse tracking box location

    From MBaz@21:1/5 to All on Wed Nov 18 18:14:26 2020
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MBaz@21:1/5 to MBaz on Wed Nov 18 18:55:57 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MBaz@21:1/5 to MBaz on Thu Nov 19 10:43:20 2020
    On Wednesday, November 18, 2020 at 9:55:59 PM UTC-5, MBaz wrote:
    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

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Karl Ratzsch@21:1/5 to All on Thu Nov 19 20:27:04 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MBaz@21:1/5 to MBaz on Thu Nov 19 18:20:11 2020
    On Thursday, November 19, 2020 at 1:43:22 PM UTC-5, MBaz wrote:
    On Wednesday, November 18, 2020 at 9:55:59 PM UTC-5, MBaz wrote:
    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
    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.

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)