|
From: Daniel J S. <dan...@ie...> - 2006-11-17 21:40:55
|
A while back Ethan brought to my attention that the binary code didn't allow use of defined expressions like most commands in gnuplot, i.e., it didn't use the routine const_express(). Using const_express() created a problem with syntax. The issue is that the comma separating multiple entries must be resolved against its use as the separator between two plot commands on the same line. To do that would require attempting to check if there is a valid constant expression, if not, back up and treat as the start of a new plot command. However, const_express() internally errors and does not return, so that idea is strictly limited. So, as a straightforward workaround, I suggest a change in syntax--on something that few people have probably used as of yet. So, anyone have any objections of changing the separator from a comma to a colon. That will have an appearance similar to "using 1:2:3", for example -splot 'scatter2.bin' binary endian=little record=30,30,29,26 using 1:2:3 would become +splot 'scatter2.bin' binary endian=little record=30:30:29:26 using 1:2:3 The colon would now be in several place, e.g., splot 'image.foo' binary center=(50,50):(150,50) with rgbimage Dan |
|
From: Ethan M. <merritt@u.washington.edu> - 2006-11-17 22:08:44
|
On Friday 17 November 2006 01:51 pm, Daniel J Sebald wrote: > > So, as a straightforward workaround, I suggest a change in syntax--on > something that few people have probably used as of yet. So, anyone > have any objections of changing the separator from a comma to a > colon. That will have an appearance similar to "using 1:2:3", for > example > > splot 'scatter2.bin' binary endian=little record=30,30,29,26 u 1:2:3 > > would become > > splot 'scatter2.bin' binary endian=little record=30:30:29:26 u 1:2:3 I would rather bracket the set of specifiers while keeping the commas splot 'scatter2.bin' binary endian=little record=(30,30,29,26) u 1:2:3 > The colon would now be in several place, e.g., > > splot 'image.foo' binary center=(50,50):(150,50) with rgbimage I don't understand what that one is supposed to do. The docs say for 'binary keyword center' Similar to `origin`, this keyword will position the array such that its center lies at the point given by the tuple. For example, `center=(0,0)`. What is the meaning of the second parenthetical pair in the above example? -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |
|
From: Daniel J S. <dan...@ie...> - 2006-11-17 22:19:54
|
Ethan Merritt wrote: > On Friday 17 November 2006 01:51 pm, Daniel J Sebald wrote: > >>So, as a straightforward workaround, I suggest a change in syntax--on >>something that few people have probably used as of yet. So, anyone >>have any objections of changing the separator from a comma to a >>colon. That will have an appearance similar to "using 1:2:3", for >>example >> >>splot 'scatter2.bin' binary endian=little record=30,30,29,26 u 1:2:3 >> >>would become >> >>splot 'scatter2.bin' binary endian=little record=30:30:29:26 u 1:2:3 > > > I would rather bracket the set of specifiers while keeping the commas > > splot 'scatter2.bin' binary endian=little record=(30,30,29,26) u 1:2:3 Well, the appearance isn't bad, but it does look a bit like a quadruple, but that isn't necessarily a problem conceptually. > > >>The colon would now be in several place, e.g., >> >>splot 'image.foo' binary center=(50,50):(150,50) with rgbimage > > > I don't understand what that one is supposed to do. There could be multiple images (or whatever) in the file. To go along with your suggestion above, it might be splot 'image.foo' binary center=((50,50),(150,50)) with rgbimage Again, a collection of pairs; that would work. Dan |
|
From: Ethan M. <merritt@u.washington.edu> - 2006-11-17 23:40:53
|
On Friday 17 November 2006 02:30 pm, Daniel J Sebald wrote:
> >>The colon would now be in several place, e.g.,
> >>
> >>splot 'image.foo' binary center=(50,50):(150,50) with rgbimage
> >
> > I don't understand what that one is supposed to do.
>
> There could be multiple images (or whatever) in the file.
Don't we already have a documented syntax for that?
If you need to treat the separate data sets in the file
differently, I think the syntax should be
splot 'image.foo' index 0 binary center=(50,50), \
'' index 1 binary center=(150,50)
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle WA
|
|
From: Daniel J S. <dan...@ie...> - 2006-11-18 05:37:17
|
Ethan Merritt wrote: > Don't we already have a documented syntax for that? > > If you need to treat the separate data sets in the file > differently, I think the syntax should be > > splot 'image.foo' index 0 binary center=(50,50), \ > '' index 1 binary center=(150,50) Possibly. I've not used index too much although I'm aware of it. The "binary" is somewhat redundant since there is only one file. (I think ruling out combined binary and ascii in a file is fine.) Dan |