awk Sort 2d histogram output from min(X,Y) to max(X,Y)

I've got Gnuplot-format 2D histogram data output which looks as follows.

6.5 -1.25 10.2804
6.5404 -1.25 10.4907
6.58081 -1.25 10.8087
6.62121 -1.25 10.4686
6.66162 -1.25 10.506
6.70202 -1.25 10.3084
6.74242 -1.25 9.68256
6.78283 -1.25 9.41229
6.82323 -1.25 9.43078
6.86364 -1.25 9.62408
6.90404 -1.25 9.23871
6.94444 -1.25 9.4298
6.98485 -1.25 9.42173
7.02525 -1.25 9.45413
7.06566 -1.25 9.2722
...
6.5 -1.21717 10.3285
6.5404 -1.21717 11.1678
6.58081 -1.21717 10.8977
6.62121 -1.21717 10.8864
6.66162 -1.21717 10.3389
6.70202 -1.21717 9.96492
6.74242 -1.21717 10.4141
6.78283 -1.21717 10.1318

The section in bold shows that for each value of Y, a set of bins is defined with varying X values.

QUESTION: I need the data re-sorted to go from min(X,Y) to max(X,Y). The data must never be decreasing, always equal or incremental records. I.e. resort structure to cover incremental pairs (X,Y)

sort -k1,1n -k2,2n inputdata.dat

did not work

DESIRED OUTPUT

6.5 -1.25 10.2804
6.5 -1.21717 10.3285

etc

Try

LC_ALL=C sort -k1,1g -k2,2g file
...
6.5 -1.25 10.2804
6.5 -1.21717 10.3285
6.5404 -1.25 10.4907
6.5404 -1.21717 11.1678
6.58081 -1.25 10.8087
6.58081 -1.21717 10.8977
6.62121 -1.25 10.4686
6.62121 -1.21717 10.8864
6.66162 -1.25 10.506
6.66162 -1.21717 10.3389
6.70202 -1.25 10.3084
6.70202 -1.21717 9.96492
6.74242 -1.25 9.68256
6.74242 -1.21717 10.4141
6.78283 -1.25 9.41229
6.78283 -1.21717 10.1318
6.82323 -1.25 9.43078
6.86364 -1.25 9.62408
6.90404 -1.25 9.23871
6.94444 -1.25 9.4298
6.98485 -1.25 9.42173
7.02525 -1.25 9.45413
7.06566 -1.25 9.2722