Discussion:
Select data points in interactive terminal
(too old to reply)
jindi.li
2021-01-09 14:55:40 UTC
Permalink
I'm using latest gnuplot 5.4 patchlevel rc1 to plot simple time series data on Windows 10,
I want to checkout whether it's possible to select data points in interactive terminal, need to check some data point's value, or even better if it's possible to select some data points and remove them, then replot.
jindi.li
2021-01-09 18:44:42 UTC
Permalink
Dig deeper in this forum, I find a similar discussion quite long time ago, any one knows how it's going or is some body working on that feature ?

Is it possible to select a point on a graph and get its exact coordinates (as they appear in data file)
https://groups.google.com/g/comp.graphics.apps.gnuplot/c/OlWN-EmQCLM/m/8kU5_ahFJVsJ
Gavin Buxton
2021-01-10 16:10:51 UTC
Permalink
Post by jindi.li
Dig deeper in this forum, I find a similar discussion quite long time ago, any one knows how it's going or is some body working on that feature ?
Is it possible to select a point on a graph and get its exact coordinates (as they appear in data file)
https://groups.google.com/g/comp.graphics.apps.gnuplot/c/OlWN-EmQCLM/m/8kU5_ahFJVsJ
Sorry, I don't have an answer other than to say when I do it I just zoom in on a point until the axis are really narrow and then middle click button (at least on linux) puts a point there with the numbers. Not exactly what you are looking for, but its what I do.

P.S. Not too sure I'd want gnuplot messing with my data files to be honest.
jindi.li
2021-01-11 03:21:43 UTC
Permalink
@Gavin Buxton,

Thanks for the nice tip, I didn't know this before.
What I used often is left double click to copy the value to clipboard.

Since Now there are so many nice python plot libs to choose from, I tend to use gnuplot to get a quick overview of the data, just use:

$>: gnuplot -e "plot 'data.csv'; pause mouse close"

Quite simple yet I can examine the data interactivily, and I can even export it to vector format.
To that task, I think Gnuplot is Unbeatable.


在 2021年1月11日星期一 UTC+8 上午12:10:52,<Gavin Buxton> 写道:
Post by Gavin Buxton
Post by jindi.li
Dig deeper in this forum, I find a similar discussion quite long time ago, any one knows how it's going or is some body working on that feature ?
Is it possible to select a point on a graph and get its exact coordinates (as they appear in data file)
https://groups.google.com/g/comp.graphics.apps.gnuplot/c/OlWN-EmQCLM/m/8kU5_ahFJVsJ
Sorry, I don't have an answer other than to say when I do it I just zoom in on a point until the axis are really narrow and then middle click button (at least on linux) puts a point there with the numbers. Not exactly what you are looking for, but its what I do.
P.S. Not too sure I'd want gnuplot messing with my data files to be honest.
jindi.li
2021-01-12 01:09:44 UTC
Permalink
I aware there is a show bind command to list all keyboard shortcuts and mouse shortcuts of the current terminal

gnuplot> show bind

<B1> doubleclick send mouse coordinates to clipboard (pm win wxt x11)
<B2> annotate the graph using `mouseformat` (see keys '1', '2')
or draw labels if `set mouse labels is on`
<Ctrl-B2> remove label close to pointer if `set mouse labels` is on
<B3> mark zoom region (only for 2d-plots and maps)
<B1-Motion> change view (rotation); use <Ctrl> to rotate the axes only
<B2-Motion> change view (scaling); use <Ctrl> to scale the axes only
<Shift-B2-Motion> vertical motion -- change xyplane
<B3-Motion> change view (azimuth)
<wheel-up> scroll up (in +Y direction)
<wheel-down> scroll down
<shift-wheel-up> scroll left (in -X direction)
<shift-wheel-down> scroll right
<Control-WheelUp> zoom in on mouse position
<Control-WheelDown> zoom out on mouse position
<Shift-Control-WheelUp> pinch on x
<Shift-Control-WheelDown> expand on x

q * close this plot window

a `builtin-autoscale` (set autoscale keepfix; replot)
b `builtin-toggle-border`
e `builtin-replot`
g `builtin-toggle-grid`
h `builtin-help`
i `builtin-invert-plot-visibilities`
l `builtin-toggle-log` y logscale for plots, z and cb for splots
L `builtin-nearest-log` toggle logscale of axis nearest cursor
m `builtin-toggle-mouse`
r `builtin-toggle-ruler`
V `builtin-set-plots-invisible`
v `builtin-set-plots-visible`
1 `builtin-previous-mouse-format`
2 `builtin-next-mouse-format`
5 `builtin-toggle-polardistance`
6 `builtin-toggle-verbose`
7 `builtin-toggle-ratio`
n `builtin-zoom-next` go to next zoom in the zoom stack
p `builtin-zoom-previous` go to previous zoom in the zoom stack
u `builtin-unzoom`
+ `builtin-zoom-in` zoom in
= `builtin-zoom-in` zoom in
- `builtin-zoom-out` zoom out
Right `scroll right in 2d, rotate right in 3d`; <Shift> faster
Up `scroll up in 2d, rotate up in 3d`; <Shift> faster
Left `scroll left in 2d, rotate left in 3d`; <Shift> faster
Down `scroll down in 2d, rotate down in 3d`; <Shift> faster
< `rotate azimuth left in 3d`; <ctrl> faster
`rotate azimuth right in 3d`; <ctrl> faster
Escape `builtin-cancel-zoom` cancel zoom region

* indicates this key is active from all plot windows
jindi.li
2021-01-12 01:19:10 UTC
Permalink
And I notice that "set mouse labels" must be set to make
<Ctrl-B2> remove label close to pointer
work,
and also fix that when I zoom or rescale the plot graph, the pin annotation made with middle mouse click is disappear.
jindi.li
2021-01-12 05:17:08 UTC
Permalink
I'm Quite happy to notice the Conditional Plotting in gnuplot, which solve my initial question,
I need to remove some data point in the plot graph without touch my real data.

I post the line work for me here in case someone need that too.

Yes, as simple as:
$>: plot 'scale.csv' u ($1>=0?$1:NaN)

which I didn't notice yet.

Loading...