gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
274 stars 61 forks source link

strange error message for [X|Y|Z]TICK_GET when using Coyote library #1781

Closed brandy125 closed 5 months ago

brandy125 commented 5 months ago

Can anybody check if this is a GDL problem or a Coyote library problem?

GDL> x=findgen(100) & y=x^2
GDL> cgzplot,x,y

gives the following error message:

CGPLOT--> PLOT: Internal GDL error for [X|Y|Z]TICK_GET, please report
alaingdl commented 5 months ago

I got exactly the same problem :(

alaingdl commented 5 months ago

plotting.cpp:2999: if (val == NULL) e->Throw("Internal GDL error for [X|Y|Z]TICK_GET, please report");

alaingdl commented 5 months ago

in fact this code code was working fine till circa 2023-11-02 and is not OK since 2023-11-14

unfortunately no tests related to that in the testsuite :(

GillesDuvert commented 5 months ago

@alaingdl you know it's difficult to test graphic functions, if somebody has an idea...

alaingdl commented 5 months ago

I have idea, I am finishing now a code to add some related tests in the testsuite (and is working fine)

But sorry @GillesDuvert , the changes are too large in Nov 2023 than I can track the bug in short time :(

GillesDuvert commented 5 months ago

Well, this is enough a test, and yes, TICK_GET got forgotten in the last changes I made to AXIS, PLOT etc. Probably will be a one-liner, to be followed...

GillesDuvert commented 5 months ago

Absolutely NOT a one-liner, this thing! Rather, yes, getting tick values (historically defined by plplot) back is/was just a matter of a few lines of code. But, I realized that these values and the number of ticks was not at all correct. In fact, there is an historical "AutoTick" function that gives a far approximation of the IDL "algorithm" to fix the number and values of tick intervals. I've found the correct algorithm, which is, once again, very clever and aesthetically pleasing, as IDL always did. Implementation will follow.