Grid lines at <1 second intervals when using -JXt (absolute time)


I was just wondering if there is a way to get -B gridline intervals at less than 1 s spacing when using absolute times. I tried using g0.2 to get gridlines every 0.2 seconds, but

gmt basemap -JX20ct/10c -R0/30/-15/1 -BlSrn -Bxa5Sf1g0.2+a60+l"time (s)" -Byg1 -pdf temp

gives the error message

basemap [ERROR]: Time step interval (0.2) must be an integer

Is there any way around this?


EDIT: Of course, I’ve just realised that I can plot a basemap underneath with -JX rather than -JXt using the same -R, and plot 0.2-interval gridlines with no annotations, and then plot my absolute-time basemap directly on top, with annotations but no gridlines. However I guess it would be nice to do this in one line rather than two.

Right. Just to be clear, for actual time-series coordinates one can either specify absolute time (stuff like 2020-03-12T13:44:30.02) or relative time (to a specific EPOCH) in the selected TIME_UNIT. Yet, the 1-second test is probably unnecessary since we re not storing any intervals as integers anyway. However, I will need to fix the gridline part for relative time as it leapt into the absolute time gridline section and got kicked out.

I have submitted a pull request to GitHub which probably will be merged into master pretty soon.

1 Like