How to not showing the coordinates (x,y) when mouse move? - gnuplot

I'm able to make a svg file using gnuplot. when I click any place in the plot, the (x,y) coordinates will show up, when the mouse move, the coordinates change, when I click the plot again, the coordinate disappear.
How to not display the coordinates when mouse click and move?
Thanks!
I have tried:
set mouse noruler
set mouse mouseformat 6
set mouse mouseformat ""
set mouse clipboardformat 6
The code is:
set term svg mouse jsdir "http://.../TEST/"
set output "test.svg"
plot 'test.data' using 1:2:3 with labels hypertext point pt 7

I think I initially misunderstood your question (1st answer now deleted). Let me try again.
You are describing the default behaviour of mousing support in gnuplot+svg.
(1) Simple option: If you don't want any of this, do not include the mouse keyword when you select the terminal.
(2) Infinitely customizable option: The javascript mousing behaviour is implemented in a separate file gnuplot_svg.js. Several versions exist, but you could edit or replace any of them to suit your needs. The most recent version is here:
gnuplot_svg.js
(3) Possible compromise: The *.svg file produced by gnuplot contains lines like this:
<g id="gnuplot_canvas" onclick="gnuplot_svg.toggleCoordBox(evt)" onmousemove="gnuplot_svg.moveCoordBox(evt)">
If you want to disable only the response to mouse clicks, or to mouse movement, edit these lines to remove the corresponding onclick or onmousemove directives.

Related

First plot disappear when moving mouse wheel

I plot my data with multi-plot(two plots arraged by two rows one column ) by gnuplot5.2 in a script. And I get my plot perfectly--the completed plot is output to screen because I set term win.
But when I move mouse wheel in the window screen, the first plot(the upper one) disappeared and never come back again. Only the second plot remains on screen.
Does anyone meet the same problem? And anyone can help me finding back the disappeared plot on screen?
It seems that moving the mouse wheel triggers a replot which only repeats the last plot command. Therefore I'm afraid that the disappeared plot can not be restored.
But it would be a nice feature.
Update:
If your subplots have the same ranges, you can try this (ugly) workaround. Split your script into two files like that:
# a.plt
reset
set xrange [0:pi]
set yrange [-1:1]
load "b.plt"
and
# b.plt
set multiplot layout 2,1
plot sin(x)
plot cos(x)
unset multiplot
Then, in the first run, start gnuplot and run a.plt with
load "a.plt"
And then, after each mouse wheel action, reload and run b.plt with
load "b.plt"
The two plots must have the same ranges because gnuplot remembers only the last settings, changes them according to your mouse wheel action, and applies them to both plots. In my opinion this is a limitation which renders the workaround nearly unusable.

Re-scaling x, y-axis on capture correct coordinate scale on mouse-over in matplotlib

I am rendering a data as shown below using cluster analysis.
As you can see that ports in the range of 0-200 are clubbed together. Is there a way to zoom in on the scale when I mouse over a coordinate and thereby redrawing that section of the graph again in a zoomed window. What i mean is that for the coordinates shown in blue circle, when I mouse over, I want the x, y axis redrawn for 0-10000 using a different scale so that overlapping circles move apart. Is it possible ?. I must confess I find matplotlib little challenging and my apologies if my question is little cryptic. thanks for the help!
Assuming youre using pyplot then this functionality is built right in to the pyplot output.
See the following from the matplotlib documentation.
The Zoom-to-rectangle button
Click this toolbar button to activate this mode. Put your mouse somewhere over an axes and press the left mouse button. Drag the mouse while holding the button to a new location and release. The axes view limits will be zoomed to the rectangle you have defined. There is also an experimental ‘zoom out to rectangle’ in this mode with the right button, which will place your entire axes in the region defined by the zoom out rectangle.
If you need to enable zoom to rectangle functionality without actually clicking then this will be possible by creating a transparent figure positioned in a location of your choice on your plot and then initiating a matplotlib event to be handled when the mouse hovers over this area. This functionality is not built in and will require customisation.
Detail relating to event handling on mouseover events can be found at this URL

gnuplot - why plotted lines disappear after certain zoom in level?

I'm completely new to gnuplot.
I'm trying to plot a couple of trivial series of data on one plot.
Actually I mean a small number of simple segments [x1,y1] -> [x2,y2]
But I noticed an annoying behaviour: when I try to zoom my canvas with mouse into specified location, e.g. lines crossing point, my lines eventually disappear. Not all at once - they
disappear one by one at different zoom levels.
I'm not able to examine specific point from close up because of this.
Is it possible prevent my graph elements from disappearing from window?
The behaviour of the plot when one or both end points of a line are outside the displayed range is controllable with set clip.
To have the line portion drawn which is inside the plot but both endpoints being outside, you must use set clip two.
Consider the following example:
plot '-' with linespoints
0.5 0.5
9.5 9.5
e
If you now zoom in, the line disappears. If you use set clip two before, then you can zoom in and the line is drawn:
set clip two
plot '-' with linespoints
0.5 0.5
9.5 9.5
e
(tested to work with 4.6.5)

gnuplot: Too many tooltips appearing at once on HTML canvas, causes browser freeze

I'm using gnuplot to create a scatter plot with potentially quite a few data points (greater than 1,000,000). I use the following command to plot the data and allow tooltips on mouse hover (the terminal is html canvas as these plots are meant to be displayed in a website):
plot "$resultsFile" using 2:(stringcolumn(8) eq "chr$chrom"?\$5:1/0):1 with labels hypertext point pt 7 ps var lc rgb "black"
The issue I'm having is: when I move my mouse over a dense cluster of datapoints, so many tooltips are displayed as the mouse moves that the browser freezes for a few seconds or even longer in an attempt to display them all. Does anyone know a way to stop this from happening? Perhaps by adding a delay before the tooltip is displayed on mouse over.

force graphs legend/key to a specific size

i want to generate some plots from my data that i want to include in some documentation.
I put the box outside the graph area.
the problem is that for different plots the box has different sizes so also the graph area changes its size. this looks very messy in the document becasue the plots are vertical aligned.
I am searching for a way to fix the size of the box to some width that is appropriate for all plots but i could not found a way to do so.
the set key command has a width parameter but it seems not to do that one would expect from such a parameter.
It would be grat if someone could help.
thanks
vlad
I hope I got the correct impression of what you want. Consider the following example
reset
set multiplot layout 2,1
set rmargin screen 0.7
set key reverse Left left top at screen 0.72, graph 1
plot sin(x), cos(x) t 'long title'
plot sin(x), cos(x) t 'very long title'
unset multiplot
Which gives you:
Both the samples and the text do not move. You must only set an appropriate rmargin. left and top is the key box alignment regarding the position specified with at ..., although these settings are default, I explicitely included them for clarity. Left is the alignment of the entry text.

Resources