The instructions for compiling in this option (called "mouse support") are at http://www.sci.muni.cz/~mikulik/gnuplot.html#cvsdownload
Here's the list of mouse and key commands available (you can also display this information by pressing "h" with the plot window in focus):
<B1> print coordinates to clipboard using `clipboardformat` (see keys '3', '4') <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). <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 ticslevel Space raise gnuplot console window q quit X11 terminal a `builtin-autoscale` (set autoscale keepfix; replot) b `builtin-toggle-border` e `builtin-replot` g `builtin-toggle-grid` h `builtin-help` l `builtin-toggle-log` y logscale for plots, z and cb logscale for splots L `builtin-nearest-log` toggle logscale of axis nearest cursor m `builtin-toggle-mouse` r `builtin-toggle-ruler` 1 `builtin-decrement-mousemode` 2 `builtin-increment-mousemode` 3 `builtin-decrement-clipboardmode` 4 `builtin-increment-clipboardmode` 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` Right `builtin-rotate-right` only for splots; <shift> increases amount Up `builtin-rotate-up` only for splots; <shift> increases amount Left `builtin-rotate-left` only for splots; <shift> increases amount Down `builtin-rotate-down` only for splots; <shift> increases amount Escape `builtin-cancel-zoom` cancel zoom region
This is an example of using the "reread" command in gnuplot to create dynamic plots. Dynamic plots can be created by using a driver gnuplot file and a gnuplot file containing the "plot" command that will continually be re-read.
We want to create a continually updating plot of the ping times to www.lsu.edu.
eagle% ping -ns www.lsu.edu >! lsu.ping &
PING lsuosa5-gbe2.ocs.lsu.edu: 56 data bytes 64 bytes from 130.39.184.91: icmp_seq=0. time=59. ms 64 bytes from 130.39.184.91: icmp_seq=1. time=50. ms 64 bytes from 130.39.184.91: icmp_seq=2. time=124. ms 64 bytes from 130.39.184.91: icmp_seq=3. time=50. ms 64 bytes from 130.39.184.91: icmp_seq=4. time=50. ms 64 bytes from 130.39.184.91: icmp_seq=5. time=50. ms 64 bytes from 130.39.184.91: icmp_seq=6. time=49. ms 64 bytes from 130.39.184.91: icmp_seq=7. time=104. msNote: On FreeBSD, the output of ping will look slightly different, so the "awk" statement in dyn-ping-loop.gp will need to be modified.
# dyn-ping.gp set key left Left rev bottom set grid set ylabel "RTT (ms)" set xlabel "time (s)" set yrange [0:] load "dyn-ping-loop.gp"
# dyn-ping-loop.gp # For SunOS ping plot \ "< awk '/<10ms/ {print 10} /time=/ {len=length($6)-7; print substr($6,6,len)} \ /timed out/ {print 0}' lsu.ping" t "www.lsu.edu" w l # For FreeBSD ping #"< awk '/<10ms/ {print 10} /time=/ {len=length($5)-7; print substr($5,6,len)} \ #/timed out/ {print 0}' lsu.ping" t "www.lsu.edu" w l reread
eagle% gnuplot dyn-ping.gp -
A script for generating these plots is located in DiRT space at
/usr/dirt/src/ifmon/ifmon_02/plot-dyn-ifmon
It takes as input a set of (ifmonfile label) sets. For example, ifmon is tracing TCP traffic to tcp.ifmon and another ifmon is tracing UDP traffic to udp.ifmon. To plot both on a dynamic plot, use
plot-dyn-ifmon tcp.ifmon "TCP" udp.ifmon "UDP"