Ethan A Merritt wrote:
> On Sunday 28 January 2007 12:58, Mike Sutton wrote:
>
>>The comma in the offset specification confuses the command line parser.
>> plot 'mike3.dat' with labels left offset 3,3 , 'mike4.dat' with points
>> duplicated or contradicting arguments in plot options
>
>
> Yes, I had totally forgotten about that. Thanks for the reminder.
> It is a known problem, but is probably fixable.
>
>
>>A work around is to make sure the "with labels" is the last thing plotted.
>
>
> Other work-arounds:
> - Give a dummy z coordinate in the offset
> plot 'mike3' with labels left offset 3,3,0, 'mike4' with points
> - put an attribute keyword after the offset
> plot 'mike3' with labels offset 3,3 left, 'mike4' with points
> - even if it's a useless attribute
> plot 'mike3' with labels offset 3,3 nopoint, 'mike4' with points
>
I wasn't aware this issue came up elsewhere. I think this is the same problem as we skirted with a change in syntax to something else that used commas in the binary format string. That is, we changed a comma to a colon, but in that case the comma wasn't used as a delimiter for something like coordinates.
Not sure this is fixable. The problem is that one has to sort of advance the parse pointer a little too far and move on before making a final decision about how to treat the numbers. For example, note the slight difference between these two lines, both of them valid:
plot 'mike3' with labels left offset 3,3,0, 'mike4' with points
plot 'mike3' with labels left offset 3,3,0 with points
Yes, it is clear that their is a second plot and it is zero as one looks at it, but that doesn't become clear until the "with" is interpreted which from a programming perspective is too far down the line.
The problem is that an "isolated" or "stand alone" comma has multiple meanings. The only ways around this, it seems to me, is to change the syntax of end of line (difficult to deprecate something like that, but could allow new syntax that hasn't ambiguity) or restrict the use of comma somewhat (again, difficult to change at this point).
Unfortunately semicolon and backslash are already used. There is a straight line "|"
plot 'mike3' with labels left offset 3,3 | 'mike4' with points
also, ~ < > - & (actually "and" would be a not-so-illogical choice) and then possible double character use .. ;; \\.
The other approach would be to restrict coordinates to include parentheses, e.g.,
plot 'mike3' with labels left offset (3,3), 'mike4' with points
Dan
|