Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2578 > unrolled thread
| Started by | Tobias von der Krone <tobias.vonderkrone@profitbricks.com> |
|---|---|
| First post | 2014-09-17 03:04 -0700 |
| Last post | 2014-09-18 00:40 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
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
| From | Tobias von der Krone <tobias.vonderkrone@profitbricks.com> |
|---|---|
| Date | 2014-09-17 03:04 -0700 |
| Subject | Tooltips are not shown beside the cursor |
| Message-ID | <0346d1de-6a82-4b87-a51b-e6423fb33a38@googlegroups.com> |
I'm trying gnuplot 5 RC 2 with the following data files:
io_latency_write_c9.data:
<pre>
storage "finish in 8ms" "finish in 16ms" "finish in 32ms" "finish in 64ms" "finish in 128ms" "finish in 256ms" "finish in 512ms" "finish greater equal 512ms"
storage901 75.782 3.802 8.864 8.981 2.024 0.519 0.000 0.028
</pre>
io_latency_write_real_c9.data:
<pre>
storage "finish in 8ms" "finish in 16ms" "finish in 32ms" "finish in 64ms" "finish in 128ms" "finish in 256ms" "finish in 512ms" "finish greater equal 512ms"
storage901 75.8 79.6 88.4 97.4 99.5 100.0 100.0 100.0
</pre>
and this is the gnuplot file:
<pre>
set terminal svg size 1024,1024 dynamic enhanced fname 'arial' fsize 12 mouse standalone name "io_latency" butt dashlength 1.0
set output 'io_latency.svg'
set multiplot layout 2,1
set key invert reverse Left outside
set key autotitle columnheader
set style histogram rowstacked gap 2
set style data histograms
set style fill solid border -1
set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000
#set boxwidth 0.75
set boxwidth 0.75
set yrange [0:100]
set ylabel "% of total"
set xtic rotate by -45 scale 0
COLORS="white dark-green web-green yellow orange dark-orange light-red red black"
GAPSIZE=2
STARTCOL=2
ENDCOL=9
set title "IO Latency Read - md400 - 2014-09-12 00:00:00 to 2014-09-13 06:00:00\nread:finish in 8ms:<65%, read:finish in 16ms:<85%, write:finish in 8ms:<75%, write:finish in 16ms:<90"
plot for [COL=STARTCOL:ENDCOL] 'io_latency_read_c9.data' using COL:xtic(1) with histogram title columnheader(COL) lc rgb word(COLORS, COL),\
for [COL=STARTCOL:ENDCOL] 'io_latency_read_real_c9.data' using 0:COL:(stringcolumn(COL)."%") notitle with labels hypertext point pointtype 5
unset multiplot
quit
</pre>
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?
[toc] | [next] | [standalone]
| From | Ethan A Merritt <sfeam@users.sourceforge.net> |
|---|---|
| Date | 2014-09-17 10:21 -0700 |
| Message-ID | <lvcfur$a5p$1@dont-email.me> |
| In reply to | #2578 |
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>
[toc] | [prev] | [next] | [standalone]
| From | Tobias von der Krone <tobias.vonderkrone@profitbricks.com> |
|---|---|
| Date | 2014-09-18 00:40 -0700 |
| Message-ID | <40224dc3-923d-4500-b873-12b01d1e5820@googlegroups.com> |
| In reply to | #2579 |
Thanks Ethan! Embedding in a html does the trick - what I wanted to do anyway.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web