ticks wrongly positioned, depending on format
Consider the spreadsheet in the attached image and, equivalently, in the attached .gnumeric file.
In the left graph, on the lower X axis (shown in black), the tick marks are positioned at integer multiples of the tick spacing, even though Xmin is not an integer multiple. This is the normal, desired, expected behavior. The upper X axis (shown in blue) is also just fine. So far so good.
The right graph was created by copy-pasting the left graph and making one small change, namely the formatting of the lower (black) X tick labels. This exhibits abnormal, undesired, and unexpected behavior:
-
Changing the format changes the position of the ticks. This should never happen. Positioning should be independent of formatting.
-
The X tick marks are not positioned at integer multiples of the X tick spacing. This should never happen.
Note that this bug can easily produce false and misleading graphs, as shown by this example. The data points are wrongly positioned relative to the labeled ticks.
Workaround
The upper (blue) X axis is created by an "Axis Line" (not the basic axis feature). This gives explicit control over tick positioning. The ticks remain where they should be, independent of formatting.
Circumstances
This is observed with freshly pulled git sources, and also with a years-old distro version.
:; uname -srmo
Linux 5.19.0-45-generic x86_64 GNU/Linux
:; lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
:; gnumeric --version
gnumeric version '1.12.51'
datadir := '/usr/share/gnumeric/1.12.51'
libdir := '/usr/lib/gnumeric/1.12.51'