On some of our 32-bit arm systems (Jetson Tegra) plotting gives
problems : you'll get an error about "Bad format character" after e.g.
a wxdraw..() command instead of a nice plot.
I found out that the problem is caused by the command "set format '%h'" in the
maxout_<number>.gnuplot files, which isn't liked by the gnuplot version
on these Tegra's (gnuplot Version 4.6 patchlevel 4).</number>
Gnuplot patchlevel 6 doesn't seem to have problems with %h although the option
itself is nowhere documented , so the question is : why is it there ?
But a temporary fix is to override this problem by e.g. using the plot option
user_preamble="set format '%.1f'" in set_draw_defaults() or at the
beginning of the draw() command.
set_draw_defaults(user_preamble="set format '%.1f'",enhanced3d=true);
/ or /
draw3d(user_preamble="set format '%.1f'",enhanced3d=true,
explicit(sin(x*y), x, 0, %pi, y , 0, %pi));
A permanent workaround is to modify the gnuplot.lisp file in the
...../share/maxima/5.38.1/share/draw directory : simply replace "set
format '%h'" with "set format '%.1f'".
Question remains: why do you use "set format '%h'" if it is undocumented in Gnuplot ?
Maxima version: "5.38.1"
Maxima build date: "2016-08-25 09:10:32"
Host type: "armv7l-unknown-linux-gnueabi"
Lisp implementation type: "GNU Common Lisp (GCL)"
Lisp implementation version: "GCL 2.6.12"
Best,
KL
Dear Kees,
If I recall correctly, this line was introduced to avoid a problem with tics marks. I think that the numbers included a lot of unnecessary zeroes. This problem arose after the release of Gnuplot 5.0.
Certainly, format %h does not exist in Gnuplot 4.6, but it does in version 5.0. With this new line, we could fix the bug.
Can you install a newer version of Gnuplot in your system?
Also, in order to make draw compatible with older versions of Gnuplot, we could remove
set format '%h'
and write something like this
if(GPVAL_VERSION >= 5.0){set for [i=1:8] linetype i dashtype i; set format '%h'}
Can you try this chage in maxout_<number>.gnuplot and load the file from a Gnuplot session? I can't reproduce your problem in my system.</number>
Thanks for your report.
--
Mario
I'm marking this item as "won't fix" since it seems to be due to a previous version of Gnuplot. Unfortunately I don't know that there is any better solution than to update the Gnuplot installation -- I know that may cause its own difficulties.
The problematic code is now only executed by Gnuplot 5.0 or newer versions. I have not tested this change in older versions.