2

I am plotting some financial data in gnuplot as candlesticks. Example of the data:

2022-04-20T00:01:00 1.07907 1.07901 1.07916 1.07907
2022-04-20T00:02:00 1.07906 1.079 1.07908 1.07907
2022-04-20T00:03:00 1.07906 1.07898 1.07909 1.07905
2022-04-20T00:04:00 1.07906 1.07889 1.07906 1.07895
2022-04-20T00:05:00 1.07892 1.07889 1.07901 1.07895
2022-04-20T00:06:00 1.07894 1.07887 1.07894 1.07891
2022-04-20T00:07:00 1.07892 1.07887 1.07895 1.0789
2022-04-20T00:08:00 1.07892 1.07889 1.07904 1.07902
2022-04-20T00:09:00 1.07903 1.07901 1.07909 1.07903
2022-04-20T00:10:00 1.07904 1.079 1.07912 1.07903
2022-04-20T00:11:00 1.07902 1.079 1.07903 1.07902
2022-04-20T00:12:00 1.07903 1.07899 1.07905 1.07901
2022-04-20T00:13:00 1.07903 1.07899 1.07905 1.07902
2022-04-20T00:14:00 1.07901 1.07891 1.07905 1.07895
2022-04-20T00:15:00 1.07893 1.07886 1.07898 1.07887
2022-04-20T00:16:00 1.07888 1.07887 1.07898 1.07893
2022-04-20T00:17:00 1.07892 1.07892 1.07904 1.07901
2022-04-20T00:18:00 1.07902 1.079 1.07905 1.07902

For plotting, I use this script:

set mxtics 10
set mytics 10
set grid mxtics mytics
set xdata time
set timefmt "%Y-%m-%dT%H:%M:%S"
set format x "%H:%M:%S"
plot filename using 1:2:3:4:5 with candlesticks

pause mouse close

I execute gnuplot as follows:

gnuplot -e "filename='/tmp/dat'" gnuplot_script.dat

This works great, except for the status bar:

enter image description here

For the time/date, the status bar just displays a scientific notation of the unix timestamp (I guess). However, I would like to be able to read the specific time when moving the mouse cursor in the plot. Is it possible to change the format?

1 Answers1

1

I wonder if set mouse mouseformat 3 would help, based on this reddit post by a now-deleted user: https://www.reddit.com/r/gnuplot/comments/jjp2nk/comment/gaf9pid/?utm_source=share&utm_medium=web2x&context=3.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255