Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2579

Re: Tooltips are not shown beside the cursor

From Ethan A Merritt <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Tooltips are not shown beside the cursor
Date 2014-09-17 10:21 -0700
Organization gnuplot development
Message-ID <lvcfur$a5p$1@dont-email.me> (permalink)
References <0346d1de-6a82-4b87-a51b-e6423fb33a38@googlegroups.com>

Show all headers | View raw


Tobias von der Krone wrote:

> I'm trying gnuplot 5 RC 2 with the following data files:

[snip]

> set terminal svg size 1024,1024 dynamic enhanced fname 'arial' fsize 12 \
>                  mouse standalone name "io_latency" butt dashlength 1.0

[snip]

> I have the problem that the tooltips shown when I hover the labels point
> are not positioned near the cursor but ~200px too far right.
> 
> Any ideas?

I can see what is going wrong but I do not have an immediate fix for
the mousing code in gnuplot_svg.js.

The problem is triggered by the "dynamic" keyword in "set term svg".
For some reason the textbox coordinates and the plot coordinates are
not being scaled equally as the viewer window zoom or viewport changes.

Two possible workarounds:

1) Use "fixed" rather than "dynamic".  This has no bad effects that
   I can see when viewing in firefox or chrome.  Possibly other viewers
   would act differently.

2) Embed the svg file in a minimal *.html file.
   For whatever reason this makes the dynamic scaling work.
   Example below.  Note that the width and height in the <embed>
   statement must match those in the "set term svg" command.

If someone out there recognizes this peculiarity and has a fix for
the *.js code, please let me know.

<!DOCTYPE HTML>
<html>
<head>
<title>minimal wrapper for gnuplot svg file</title>
<meta charset="UTF-8" />
</head>
<body>
<embed src="io_latency.svg" type="image/svg+xml" width=1024 height=1024 class="float-right">
</body>
</html>

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Tooltips are not shown beside the cursor Tobias von der Krone <tobias.vonderkrone@profitbricks.com> - 2014-09-17 03:04 -0700
  Re: Tooltips are not shown beside the cursor Ethan A Merritt <sfeam@users.sourceforge.net> - 2014-09-17 10:21 -0700
    Re: Tooltips are not shown beside the cursor Tobias von der Krone <tobias.vonderkrone@profitbricks.com> - 2014-09-18 00:40 -0700

csiph-web