complot.c, parameters to command clip may be expressions yielding
a single valued vector or may be real numbers
This commit is contained in:
parent
ebf0b8ce68
commit
5e25bb026d
|
|
@ -25,18 +25,23 @@ com_bltplot(wordlist *wl)
|
|||
|
||||
#endif
|
||||
|
||||
/* Evaluate the command clip v(1) xmin xmax
|
||||
xmin and xmax may be expressions of single valued vectors or real numbers.
|
||||
Then call vec_clip() to do the clipping */
|
||||
void
|
||||
com_clip(wordlist *wl)
|
||||
{
|
||||
int err;
|
||||
struct pnode *names;
|
||||
struct dvec *vec;
|
||||
double xmin, xmax;
|
||||
char *vecname = wl->wl_word;
|
||||
wl = wl->wl_next;
|
||||
char *mword = wl->wl_word;
|
||||
xmin = INPevaluate(&mword, &err, TRUE);
|
||||
wl = wl->wl_next;
|
||||
mword = wl->wl_word;
|
||||
xmax = INPevaluate(&mword, &err, TRUE);
|
||||
names = ft_getpnames(wl, TRUE);
|
||||
vec = ft_evaluate(names);
|
||||
xmin = vec->v_realdata[0];
|
||||
names = names->pn_next;
|
||||
vec = ft_evaluate(names);
|
||||
xmax = vec->v_realdata[0];
|
||||
vec_clip(vecname, xmin, xmax);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue