|
From: Ethan M. <merritt@u.washington.edu> - 2008-01-22 22:21:10
|
On Tuesday 22 January 2008 05:54, Daniel Heiserer wrote: > dear developers, > > I am nost sure if this is the developers list, but I didn't find another link to it. The is the developer list, yes. Welcome. > Problem: > I would like to add some functions to the CVS version of gnuplot. > These functions include: > min() > max() > std() > mean() > etc. > > so for example it would be possible to run: > > plot "summary_01.ascii" using 1:(0.90*min($2,$3)) with lines lt 1 lc rgb "#0000ff" lw 2 Could you explain why you need to have these as built-in functions? What is wrong with just defining them yourself: min(A,B) = A < B ? A : B You can put that definition in your customization file ~/.gnuplot if you always like to have it. > Is there a way, that the gnuplot "parser" detects the number of arguments > on another way and I have access to it It knows internally, yes. You could look at the implementation of sprintf() for example. That takes an arbitrary number of arguments. The internal name for this function is f_sprintf(). You can find the source code in internal.c -- Ethan A Merritt |