Closed GillesDuvert closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 43.72%. Comparing base (
86806a3
) to head (9edc636
). Report is 5 commits behind head on master.:exclamation: Current head 9edc636 differs from pull request most recent head 235b5d1. Consider uploading reports for the commit 235b5d1 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
As shown by new test file in #1786 test_xyztick_get.pro
this PR is not fully ok :(
(bon courage @GillesDuvert )
Hi Gilles
(we have a /debug in test_xyztick_get.pro
to print, the expected versus the computed ticks)
for me we still few works on that :
GDL> plot, findgen(63)-500, xtick_g=x1, ytick_g=y1
GDL> print, x1, y1
0.0000000 10.000000 20.000000 30.000000 40.000000 50.000000
60.000000 70.000000
-500.00000 -490.00000 -480.00000 -470.00000 -460.00000 -450.00000
-440.00000 -430.00000
IDL> plot, findgen(63)-500, xtick_g=x1, ytick_g=y1
IDL> print, x1, y1
0.0000000 20.000000 40.000000 60.000000 80.000000
-500.00000 -480.00000 -460.00000 -440.00000 -420.00000
(derived from the 3d case (SURFACE))
the good point is we have a way to make automatic tests on that ...
Those ranges were OK since years (at least from gdl-1.0.1git220829 to gdl-1.0.3git230929)
but #1701 is even worse !
thanks @GillesDuvert the code survives now to the updated tests test_xyztick_get
!
just a detail :
/home/gdl/GDL/TestPR1785/gdl/src/plotting.cpp: In function ‘void lib::doOurOwnFormat(PLFLT, char*, PLINT, PLPointer)’:
/home/gdl/GDL/TestPR1785/gdl/src/plotting.cpp:1542:38: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 4 has type ‘__gnu_cxx::__promote_2<int, double, double, double>::__type’ {aka ‘double’} [-Wformat=]
1542 | snprintf(label, length, "%.*f", pow(10, value), prec);
| ~~^~ ~~~~~~~~~~~~~~
| | |
| int __gnu_cxx::__promote_2<int, double, double, double>::__type {aka double}
/home/gdl/GDL/TestPR1785/gdl/src/plotting.cpp:1542:39: warning: format ‘%f’ expects argument of type ‘double’, but argument 5 has type ‘int’ [-Wformat=]
1542 | snprintf(label, length, "%.*f", pow(10, value), prec);
| ~~~^ ~~~~
| | |
| double int
| %.*d
[ 27%] Linking CXX executable gdl
[100%] Built target gdl
but #1701 is even worse ! thanks @GillesDuvert the code survives now to the updated tests
test_xyztick_get
!just a detail :
/home/gdl/GDL/TestPR1785/gdl/src/plotting.cpp: In function ‘void lib::doOurOwnFormat(PLFLT, char*, PLINT, PLPointer)’: /home/gdl/GDL/TestPR1785/gdl/src/plotting.cpp:1542:38: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 4 has type ‘__gnu_cxx::__promote_2<int, double, double, double>::__type’ {aka ‘double’} [-Wformat=] 1542 | snprintf(label, length, "%.*f", pow(10, value), prec); | ~~^~ ~~~~~~~~~~~~~~ | | | | int __gnu_cxx::__promote_2<int, double, double, double>::__type {aka double} /home/gdl/GDL/TestPR1785/gdl/src/plotting.cpp:1542:39: warning: format ‘%f’ expects argument of type ‘double’, but argument 5 has type ‘int’ [-Wformat=] 1542 | snprintf(label, length, "%.*f", pow(10, value), prec); | ~~~^ ~~~~ | | | | double int | %.*d [ 27%] Linking CXX executable gdl [100%] Built target gdl
done, and it was important.
oops getLabelingValues was wrongly clearing values. Also, insure only the 1st axis values are reported