Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#1153 Canvas terminal with epoch time loses axis edges precision

2D plot (258)
Petteri Tolonen

When using canvas terminal to plot data with epoch time (timefmt '%s'), there's an offset in the mouse coordinates printed by javascript. This is because gnuplot for some reason outputs the values of gnuplot.plot_axis_xmin and gnuplot.plot_axis_xmax in exponential format and some precision of epochs is lost. I'm using Ubuntu 12.4 and gnuplot 4.6.0 from Ubuntu Quantal repository.

A demonstration of the problem is enclosed and it includes the following files: - The gnuplot script used to generate index.html (html+javascript)
test.dat - Test data is CSV data generated by CollectD monitoring system. First column is the epoch and first on the first row are the headers. The values represent load values on one computer.
js/* - The gnuplot files from /usr/share/gnuplot/4.6/gnuplot/gnuplot/js/ (on Ubuntu 12.4)

How to demonstrate:
- extract the package to some directory
- run: "gnuplot" to generate index.html on the same directory
- open the index.html with some modern browser
- move the mouse on the plot and see that the time on the coordinate box left of the plot differs from the time on x-axis tics

My result can be viewed here:


  • Demonstration files

  • Ethan Merritt
    Ethan Merritt

    fixes X axis time precision for mouseable canvas, svg terminals

  • Ethan Merritt
    Ethan Merritt

    Thank you for the analysis and the bug report.
    The attached patch is against 4.7 but should also work for 4.6.
    Some version of it will be added to cvs for the next release.

  • Ethan Merritt
    Ethan Merritt

    • status: open --> pending-fixed
  • Ethan Merritt
    Ethan Merritt

    • status: pending-fixed --> closed-fixed
    • milestone: --> 5.0