|
From: Leo B. <leo...@um...> - 2024-11-28 20:10:14
Attachments:
maxout2675.gnuplot
data2675.gnuplot
|
Hi, I am not sure if this is the right venue, please re-direct me if it is not. In the Maxima package draw [1], one finds a snippet of gnuplot code that goes like this: w filledcurves~a xy=~a,~a lc ~a axis ~a (the ~a are place holder for values, like %s in a printf template). According to git, this line was checked in on the first commit of the package 18 years ago. We got a bug report yesterday [2] that the part xy=.... is causing an error. I have attached the Gnuplot file generated by a trimmed down example extracted from that bug report. My questions are: 1. Was this syntax ever supported by gnuplot? If so, what did it do and how can the same effect be achieved in more recent gnuplots? 2. Assuming the syntax was supported, when was support removed? TIA, Leo [1] - https://sourceforge.net/p/maxima/code/ci/master/tree/share/draw/gnuplot.lisp#l902 [2] - https://sourceforge.net/p/maxima/bugs/4424/ |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2024-11-28 20:49:46
|
Am 28.11.2024 um 21:05 schrieb Leo Butler:
> w filledcurves~a xy=~a,~a lc ~a axis ~a
>
> (the ~a are place holder for values, like %s in a printf template).
>
>
> 1. Was this syntax ever supported by gnuplot? If so, what did it do and
> how can the same effect be achieved in more recent gnuplots?
I think that would depend on what the very first of those ~a thingies
expands to.
The documented syntax and the existing demos both suggest the 'xy=' part
to come rather immediately after "filledcurves". The syntax only allows
keywords like 'above' or 'below' in that place. See "help with
filledcurves" on current git head:
> Syntax for 2D:
>
> plot f(x) with filledcurves [option]
> plot DATA using 1:2 with filledcurves [option]
> plot DATA using 1:2:3 with filledcurves [option]
>
> where the option can be one of the following
>
> closed
> {above|below} x1 x2 y r=<a> xy=<x>,<y>
> between
That would indicate this fraction of the command line rejected by
gnuplot (from [1])
w filledcurves fillstyle solid 0.1 xy=-1.0,0.0
would probably still work if it hat been
w filledcurves xy=-1.0,0.0 fillstyle solid 0.1
instead.
> 2. Assuming the syntax was supported, when was support removed?
That particular syntax was never explicitly supported. It may just have
happened to work anyway. And now it doesn't.
> [1] - https://sourceforge.net/p/maxima/code/ci/master/tree/share/draw/gnuplot.lisp#l902
|
|
From: Ethan A M. <me...@uw...> - 2024-11-28 22:15:12
|
On Thursday, 28 November 2024 12:05:39 PST Leo Butler wrote: > Hi, > > I am not sure if this is the right venue, please re-direct me if it is not. > > In the Maxima package draw [1], one finds a snippet of gnuplot code that > goes like this: > > w filledcurves~a xy=~a,~a lc ~a axis ~a > > (the ~a are place holder for values, like %s in a printf template). > > According to git, this line was checked in on the first commit of the > package 18 years ago. We got a bug report yesterday [2] that the part > > xy=.... > > is causing an error. > > I have attached the Gnuplot file generated by a trimmed down example > extracted from that bug report. > > My questions are: > > 1. Was this syntax ever supported by gnuplot? If so, what did it do and > how can the same effect be achieved in more recent gnuplots? It is still supported. See "help filledcurves". The error is that this option must immediately follow the "with filledcurves". Your script sticks an unrelated option (fillstyle solid 0.1) in between the plot style and the plotstyle-specific options. After swapping the position of "fillstyle solid 0.1" and "xy=-1.0,0.0" in the plot command, the script runs without error in both gnuplot 5 and gnuplot 6. Eighteen years ago would have been early gnuplot version 4, I think, and many of the options in your script did not exist, including "fillstyle solid 0.1". Ethan > 2. Assuming the syntax was supported, when was support removed? > TIA, > Leo > > > [1] - https://urldefense.com/v3/__https://sourceforge.net/p/maxima/code/ci/master/tree/share/draw/gnuplot.lisp*l902__;Iw!!K-Hz7m0Vt54!lkzvVp1SpWsUImWc4fB3wG8IS2eDAXgREdoZNLaZ-T2LJ0Qf3VWTarY4SQx8aNSFweyKiYY_3BJzMmM2ggZ5KTkdl_MsIA$ > > [2] - https://urldefense.com/v3/__https://sourceforge.net/p/maxima/bugs/4424/__;!!K-Hz7m0Vt54!lkzvVp1SpWsUImWc4fB3wG8IS2eDAXgREdoZNLaZ-T2LJ0Qf3VWTarY4SQx8aNSFweyKiYY_3BJzMmM2ggZ5KTnC6B_VdA$ > > -- Ethan A Merritt Department of Biochemistry University of Washington, Seattle |
|
From: Leo B. <leo...@um...> - 2024-11-29 17:57:24
|
On Thu, Nov 28 2024, Hans-Bernhard Bröker <HBB...@t-...> wrote:
> Am 28.11.2024 um 21:05 schrieb Leo Butler:
>
>> w filledcurves~a xy=~a,~a lc ~a axis ~a
>> (the ~a are place holder for values, like %s in a printf template).
>> 1. Was this syntax ever supported by gnuplot? If so, what did it do
>> and
>> how can the same effect be achieved in more recent gnuplots?
>
> I think that would depend on what the very first of those ~a thingies
> expands to.
>
> The documented syntax and the existing demos both suggest the 'xy='
> part to come rather immediately after "filledcurves". The syntax only
> allows keywords like 'above' or 'below' in that place. See "help with
> filledcurves" on current git head:
>
>> Syntax for 2D:
>> plot f(x) with filledcurves [option]
>> plot DATA using 1:2 with filledcurves [option]
>> plot DATA using 1:2:3 with filledcurves [option]
>> where the option can be one of the following
>> closed
>> {above|below} x1 x2 y r=<a> xy=<x>,<y>
>> between
Ahhh, thank you. I did not understand that the 'xy=' clause was an
option for 'filledcurves'.
After looking at the git log more carefully, the error was introduced a
couple years. I have done as you suggested and corrected the error.
Thanks, Hans-Bernhard and Evan, for your help.
Best regards,
Leo
|