NEURON
axis.cpp
Go to the documentation of this file.
1 #include <../../nrnconf.h>
2 /* /local/src/master/nrn/src/oc/axis.cpp,v 1.2 1999/01/04 13:04:55 hines Exp */
3 /*
4 axis.cpp,v
5  * Revision 1.2 1999/01/04 13:04:55 hines
6  * fabs now from include math.h
7  *
8  * Revision 1.1.1.1 1994/10/12 17:22:06 hines
9  * NEURON 3.0 distribution
10  *
11  * Revision 2.63 1993/11/04 15:55:48 hines
12  * port to solaris2 (no more warnings)
13  *
14  * Revision 2.19 1993/02/02 10:34:03 hines
15  * static functions declared before used
16  *
17  * Revision 1.9 92/10/29 09:19:17 hines
18  * some errors in freeing objects fixed and replace usage of getarg for
19  * non numbers.
20  *
21  * Revision 1.8 92/10/14 10:07:55 hines
22  * move oc specific stuff out of axis.cpp and into code2.cpp
23  * new argument function hoc_pgetarg checks for double pointer on stack
24  * and returns it.
25  * hoc_val_pointer(string) returns a pointer to the variable resulting
26  * from parsing the string.
27  *
28  * Revision 1.7 92/10/09 12:13:51 hines
29  * remove old style point process syntax
30  * make hoc_run_expr(sym) much more general
31  * added hoc_run_stmt(sym) as well
32  * create them with hoc_parse_expr(char*, Symlist**) and
33  * hoc_parse_stmt(char*, Symlist**)
34  *
35  * Revision 1.6 92/07/31 08:54:52 hines
36  * following merged from hoc to oc
37  * Stewart Jasloves contribution to axis labels. This can be invoked by
38  * setting #define Jaslove 1. It is 0 by default. The 3rd and 6th arguments
39  * of axis() may have a precision which specifies the number of digits
40  * after the decimal point for axis labels. eg. 5.3 denotes 5 tic marks with
41  * 3 digits after the decimal point for each tic label
42  *
43  *
44  * Revision 1.5 92/04/15 11:22:16 hines
45  * double hoc_run_expr(sym) returns value of expresssion in sym made by
46  * hoc_parse_exper()
47  *
48  * Revision 1.4 92/04/09 12:39:52 hines
49  * ready to add idplot usage with newgraph(), addgraph(), initgraph(), xgraph()
50  * flushgraph().
51  * A facilitating function exists called
52  * Symbol* hoc_parse_expr(char* str, Symlist** psymlist) which
53  * return a procedure symbol which can be used as
54  * hoc_execute(sym->u.u_proc->defn.in);
55  * val = hoc_xpop();
56  *
57  * Revision 1.3 92/03/19 08:57:01 hines
58  * axis labels close to origin set to 0 so label not strange looking.
59  *
60  * Revision 1.2 91/10/18 14:39:40 hines
61  * symbol tables now are type Symlist containing pointers to first and last
62  * symbols. New symbols get added onto the end.
63  *
64  * Revision 1.1 91/10/11 11:11:28 hines
65  * Initial revision
66  *
67  * Revision 4.17 91/03/18 10:38:43 hines
68  * some builtin functions take address of varname. eg. regraph(&name)
69  * regraph saves list of addresses for fast plotting
70  *
71  * Revision 4.11 91/01/23 17:54:20 hines
72  * use emalloc
73  *
74  * Revision 3.99 90/09/18 13:14:31 hines
75  * plotx() and ploty() functions added so that we can hang absolute
76  * location stuff around a scaled point.
77  *
78  * Revision 3.96 90/09/04 08:30:55 hines
79  * try to get dos and unix together again in one RCS directory
80  *
81  * Revision 3.93 90/08/09 09:19:21 hines
82  * axis.cpp placement of labels slightly lowered to look good with FIG
83  *
84  * Revision 3.83 90/07/25 10:39:56 hines
85  * almost lint free on sparc 1+ under sunos 4.1
86  *
87  * Revision 3.82 90/07/25 08:51:10 hines
88  * sun uses color in graph
89  *
90  * Revision 3.53 90/03/22 16:22:18 jamie
91  * correct error with checkin
92  *
93  * Revision 3.47 90/03/22 15:22:18 jamie
94  * Jamie's Additions stopwatch and settext.
95  *
96  * Revision 3.46 90/01/24 06:35:48 mlh
97  * emalloc() and ecalloc() are macros which return null if out of space
98  * and then call execerror. This ensures that pointers are set to null.
99  * If more cleanup necessary then use hoc_Emalloc() followed by hoc_malchk()
100  *
101  * Revision 3.29 89/10/19 06:54:44 mlh
102  * printing directed through plprint(string) instead
103  * of detailed routing at each place
104  *
105  * Revision 3.7 89/07/13 08:20:25 mlh
106  * stack functions involve specific types instead of Datum
107  *
108  * Revision 3.4 89/07/12 10:25:54 mlh
109  * Lint free
110  *
111  * Revision 3.3 89/07/10 15:44:02 mlh
112  * Lint pass1 is silent. Inst structure changed to union.
113  *
114  * Revision 2.0 89/07/07 16:01:42 mlh
115  * ready to add cable stuff
116  *
117 */
118 /* version 7.1.1 12/8/88
119  change graph to not interact with plot. Adding graphmode(mode).
120  */
121 /* version 7.1.2 12/20/88
122  ordinate labels not positioned correctly on laser writer because
123  leading spaces not printed
124  */
125 /* version 7.1.3 12/29/88
126  sometimes doesn't return to last point after flushing
127  because call to axis from setup can destroy xsav and ysav
128  */
129 /* version 7.2.1 2-jan-89
130  make sure graph(t) and graphmode dont try to do anything when graph list is
131  empty. Replace onerr with static badgraph which is one when graph is empty.
132  */
133 
134 #include <stdio.h>
135 #include <stdlib.h>
136 #include <math.h>
137 #include "hoc.h"
138 #include "gui-redirect.h"
139 
140 
141 extern Object** (*nrnpy_gui_helper_)(const char* name, Object* obj);
142 extern double (*nrnpy_object_to_double_)(Object*);
143 
144 #define CLIP 1e9
145 #define XS 500.
146 #define YS 400.
147 #define XO 100.
148 #define YO 100.
149 #define Ret(a) \
150  hoc_ret(); \
151  hoc_pushx(a);
152 
153 /* This makes it easier to save and restore the 8 plot scale parameters*/
154 #define NPARAM 10
155 static double param[NPARAM] = {XO, YO, XS, YS, -1e9, -1e9, 1e9, 1e9, 0.0, 0.0};
156 #define xorg param[0]
157 #define yorg param[1]
158 #define xscale param[2]
159 #define yscale param[3]
160 #define xlow param[4]
161 #define ylow param[5]
162 #define xhigh param[6]
163 #define yhigh param[7]
164 #define xsav param[8]
165 #define ysav param[9]
166 
167 static double XSIZE = XS, YSIZE = YS, XORG = XO, YORG = YO;
168 static double xstart = 0., xstop = 1., ystart = 0., ystop = 1.;
169 static double xinc = 1., yinc = 1.;
170 static double lastmode = 1;
171 static double clip = CLIP;
172 static int grphing = 0; /* flag true if multiple graphs */
173 
174 static int SaveForRegraph = 0;
175 static int regraph_index;
176 static int max_regraph_index = 1000;
177 static int regraph_narg[1000];
178 static int regraph_mode[1000];
179 static int regraph_color[1000];
180 static double regraph_x[1000];
181 static double* regraph_y[1000];
182 
183 static int PLOT(int, int, double, double);
184 static void free_graph(void);
185 static void plotstream(int, int, double);
186 static void plotflush(int);
187 static void do_setup(void);
188 
189 void hoc_regraph(void) {
190  TRY_GUI_REDIRECT_DOUBLE("regraph", NULL);
191 
194  regraph_index++;
195  }
196  Ret(1.)
197 }
198 static void open_regraph(void) {
199  SaveForRegraph = 1;
200  regraph_index = 0;
201 }
202 static void close_regraph(void) {
203  SaveForRegraph = 0;
204 }
205 static void do_regraph(void) {
206  int i;
207  for (i = 0; i < regraph_index; i++) {
208  if (regraph_color[i] != color) {
210  }
212  }
213 }
214 static void save_regraph_item(int narg, int mode, double x) {
216  regraph_mode[regraph_index] = mode;
219  if (narg == 1 && regraph_index < max_regraph_index) {
221  regraph_index++;
222  }
223 }
224 
225 void hoc_Plot(void) {
226  TRY_GUI_REDIRECT_DOUBLE("plot", NULL);
227 
228  double ok;
229  int narg, mode;
230 
231  if (ifarg(3)) {
232  narg = 3;
233  mode = (int) *getarg(1);
234  xsav = *getarg(2);
235  ysav = *getarg(3);
236  } else if (ifarg(2)) {
237  narg = 2;
238  mode = 0;
239  xsav = *getarg(1);
240  ysav = *getarg(2);
241  } else if (ifarg(1)) {
242  narg = 1;
243  mode = (int) *getarg(1);
244  if (mode == -10) {
245  open_regraph();
246  Ret(1.);
247  return;
248  } else if (mode == -11) {
249  close_regraph();
250  Ret(1.);
251  return;
252  } else if (mode == -12) {
253  do_regraph();
254  Ret(1.);
255  return;
256  }
257  } else {
258  Printf("plot(mode)\nplot(x, y)\nplot(mode, x, y\n");
259  Printf("axis()\naxis(clip)\naxis(xorg, xsize, yorg, ysize)\n");
260  Printf("axis(xstart, xstop, ntic, ystart, ystop, ntic)\n");
261  Ret(1.);
262  return;
263  }
264  ok = PLOT(narg, mode, xsav, ysav);
265  Ret(ok);
266 }
267 
268 static int PLOT(int narg, int mode, double x, double y) {
269  int ok;
270 
271  ok = 1;
272  if (SaveForRegraph) {
273  save_regraph_item(narg, mode, x);
274  }
275  if (narg == 1) {
276  lastmode = mode;
277  return ok;
278  } else if (narg == 2) {
279  if ((mode = lastmode) == 1)
280  lastmode = 2;
281  } else {
282  lastmode = mode;
283  if ((mode = lastmode) == 1)
284  lastmode = 2;
285  }
286  x = xorg + xscale * x;
287  y = yorg + yscale * y;
288  if (x <= xhigh && x >= xlow && y <= yhigh && y >= ylow) {
289  plt(mode, x, y);
290  } else if (mode > 0) {
291  lastmode = 1;
292  ok = 0;
293  }
294  return ok;
295 }
296 void hoc_plotx(void) {
297  double val;
298  val = xorg + *getarg(1) * xscale;
299  Ret(val);
300 }
301 void hoc_ploty(void) {
302  double val;
303  val = yorg + *getarg(1) * yscale;
304  Ret(val);
305 }
306 
307 #define WIDTH 10.
308 #define HEIGHT 10.
309 void hoc_axis(void) {
310  TRY_GUI_REDIRECT_DOUBLE("axis", NULL);
311 
312 #if DOS
313  extern int newstyle;
314  extern unsigned text_style, text_orient, text_size;
315 #endif
316  int width, height;
317  double x, y;
318  double i, j, offset;
319  char s[200];
320  double x0, y0;
321 #define Jaslove 0
322 #if Jaslove
323  /* tick mark values are printed with the precision indicated in the call
324  to axis() from hoc. For example, if x ticks is 10.2 then the number
325  of ticks (xinc) is 10, and the precision (xprec) is 2 decimal places.
326  The first Sprintf() below builds the precision for the second Sprintf(),
327  so in the above example values would essentially be output as
328  printf("%.2f",x), in which x is the real value of the tick mark.
329  */
330  char ss[6];
331  static double xprec = .1, yprec = .1;
332 #endif /*Jaslove*/
333  if (ifarg(6)) {
334  xstart = *getarg(1);
335  xstop = *getarg(2);
336  xinc = *getarg(3);
337  ystart = *getarg(4);
338  ystop = *getarg(5);
339  yinc = *getarg(6);
340 #if Jaslove
341  xprec = xinc - floor(xinc);
342  yprec = yinc - floor(yinc);
343 #endif
344  xinc = floor(xinc);
345  yinc = floor(yinc);
346  } else if (ifarg(4)) {
347  XORG = *getarg(1);
348  XSIZE = *getarg(2);
349  YORG = *getarg(3);
350  YSIZE = *getarg(4);
351  } else if (ifarg(1)) {
352  clip = *getarg(1);
353  }
354  xscale = XSIZE / (xstop - xstart);
355  yscale = YSIZE / (ystop - ystart);
356  xorg = XORG - xstart * xscale;
357  yorg = YORG - ystart * yscale;
358  xlow = xstop - clip * (xstop - xstart);
359  xlow = xorg + xscale * xlow;
360  xhigh = xstart + clip * (xstop - xstart);
361  xhigh = xorg + xscale * xhigh;
362  ylow = ystop - clip * (ystop - ystart);
363  ylow = yorg + yscale * ylow;
364  yhigh = ystart + clip * (ystop - ystart);
365  yhigh = yorg + yscale * yhigh;
366  if (xorg < XORG || xorg > XORG + XSIZE)
367  x0 = XORG;
368  else
369  x0 = xorg;
370  if (yorg < YORG || yorg > YORG + YSIZE)
371  y0 = YORG;
372  else
373  y0 = yorg;
374 
375  if (!ifarg(1)) {
376  plt(1, XORG, y0);
377  for (x = xstart; x <= xstop + 1e-10; x = x + (xstop - xstart) / xinc) {
378  i = xorg + xscale * x;
379  plt(2, i, y0);
380  plt(2, i, y0 + 10.);
381  plt(1, i, y0);
382  }
383  plt(1, x0, YORG);
384  for (y = ystart; y <= ystop + 1e-10; y = y + (ystop - ystart) / yinc) {
385  j = yorg + yscale * y;
386  plt(2, x0, j);
387  plt(2, x0 + 10., j);
388  plt(1, x0, j);
389  }
390 
391 #if DOS
392  if (newstyle) {
393  settextstyle(text_style, text_orient, text_size);
394  newstyle = 0;
395  }
396  width = textwidth("O") * 1.5;
397  height = textheight("O");
398 #else
399  width = WIDTH;
400  height = HEIGHT;
401 #endif
402 
403 
404 #if Jaslove
405  Sprintf(ss, "%%%.1ff", xprec);
406 #endif
407  for (x = xstart; x <= xstop + 1e-10; x = x + (xstop - xstart) / xinc) {
408  i = xorg + xscale * x;
409 #if Jaslove
410  Sprintf(s, ss, x);
411 #else
412  if (fabs(x) < 1e-10) {
413  x = 0.;
414  }
415  Sprintf(s, "%g", x);
416 #endif
417  offset = width * (int) strlen(s) / 2;
418  if (i == x0 && y0 != YORG)
419  offset = -width / 2;
420 #if DOS
421  plt(1, i - offset, y0 - height);
422  plt(-2, 0., 0.);
423 #else
424  plt(1, i - offset, y0 - 1.5 * height);
425  plt(-2, 0., 0.);
426 #endif
427  plprint(s);
428  }
429 
430 #if Jaslove
431  Sprintf(ss, "%%%.1ff", yprec);
432 #endif
433  for (y = ystart; y <= ystop + 1e-10; y = y + (ystop - ystart) / yinc) {
434 #if Jaslove
435  Sprintf(s, ss, y);
436 #else
437  if (fabs(y) < 1e-10) {
438  y = 0.;
439  }
440  Sprintf(s, "%g", y);
441 #endif
442  offset = width * (int) strlen(s) + width;
443  j = yorg + yscale * y;
444  if (j == y0 && x0 != XORG)
445 #if DOS
446  plt(1, x0 - offset, j + height);
447 #else
448  plt(1, x0 - offset, j + 2.);
449 #endif
450  else
451 #if DOS
452  plt(1, x0 - offset, j + height / 2);
453 #else
454  plt(1, x0 - offset, j - 6.);
455 #endif
456 
457  plt(-2, 0., 0.);
458  plprint(s);
459  }
460  plt(-1, 0., 0.);
461  }
462  Ret(1.);
463 }
464 
465 /* prior to version 7.1.1
466 graph connects with the plot functions in such a way that multiple
467 line graphs can be generated by using the plot function in the same way
468 that one creates a single plot.
469 
470 graph() starts a new list of expressions and setup statements
471 graph("expr", "setup") adds this spec to the list
472 graph(1) executes the setup statements
473 graph(-1) flushes remaining part of graph
474  version 7.1.1
475  graph(t) accumulates a point with this abscissa for all expr in list.
476  graphmode(1) executes setup statements
477  graphmode(-1) flushes remaining part of graph, next graphs with start
478  new lines
479  graphmode(2...) flushes, but next graphs don't start new lines
480 */
481 
482 /* local info for graph */
483 static int initialized; /* true if the setup statements have been executed*/
484 static Symlist* graph_sym_list; /*list of expressions and setup statements*/
485 #define MAXCNT 50
486 static int pcnt; /* points per plot already stored */
487 static int badgraph = 1; /* graph data structure is no good or empty */
488 static double* lx; /* points to array which holds abscissa values */
489 
490 typedef struct Grph { /* holds info for graphing */
491  struct Grph* g_next; /*next one in the queue*/
492  Symbol* g_sexp; /* symbol for the expression */
493  Symbol* g_setup; /* symbol for the setup statement */
494  int g_color;
495  double g_param[NPARAM]; /* holds plot scale factors, etc. */
496  double g_val[MAXCNT]; /* y value buffer to plot */
498 
499 static Grph *glist_head, *glist_tail; /* access for the queue */
500 
501 void hoc_Graph(void) {
502  TRY_GUI_REDIRECT_DOUBLE("graph", NULL);
503 
504  Grph* g;
505 
506  if (ifarg(2)) {
507  if (badgraph) {
508  free_graph();
509  }
510  badgraph = 1; /* if this is not reset at end then we had an execerror*/
511  initialized = pcnt = 0;
512  if (glist_head == (Grph*) 0) {
513  lx = (double*) emalloc(sizeof(double) * MAXCNT);
514  }
515  g = (Grph*) emalloc(sizeof(Grph));
516  g->g_next = (Grph*) 0;
517  g->g_sexp = g->g_setup = (Symbol*) 0;
518  if (glist_tail != (Grph*) 0) {
519  glist_tail->g_next = g;
520  } else {
521  glist_head = g;
522  }
523  glist_tail = g;
524 
525  g->g_sexp = hoc_parse_expr(gargstr(1), &graph_sym_list);
526  g->g_setup = hoc_parse_stmt(gargstr(2), &graph_sym_list);
527  badgraph = 0; /* successful */
528  grphing = 1;
529 
530  } else if (ifarg(1) && !badgraph) {
531  plotstream(2, 2, *getarg(1));
532  } else {
533  free_graph();
534  badgraph = 1;
535  }
536  Ret(0.);
537 }
538 
539 void hoc_Graphmode(void) {
540  TRY_GUI_REDIRECT_DOUBLE("graphmode", NULL);
541  int mode;
542  if (!badgraph) {
543  mode = *getarg(1);
544  if (mode == 1) {
545  do_setup();
546  }
547  if (mode == -1) {
548  plotflush(1);
549  }
550  if (mode > 1 && pcnt > 0) {
551  plotflush(2);
552  }
553  }
554  Ret(0.);
555 }
556 
557 static void free_graph(void) {
558  Grph *g, *gnext;
559  /* free all graph space and reinitialize */
561  for (g = glist_head; g != (Grph*) 0; g = gnext) {
562  gnext = g->g_next;
563  free((char*) g);
564  }
565  if (lx) {
566  free((char*) lx);
567  lx = (double*) 0;
568  }
569  glist_head = glist_tail = (Grph*) 0;
570  grphing = initialized = pcnt = 0;
571 }
572 
573 static void plotstream(int narg, int mode, double x) {
574  Grph* g;
575 
576  if (narg == 1 || narg == 3) {
577  plotflush(1);
578  IGNORE(PLOT(narg, mode, xsav, ysav));
579  }
580  if (pcnt >= MAXCNT) {
581  plotflush(2);
582  }
583  if (narg == 2 || narg == 3) {
584  lx[pcnt] = x;
585  for (g = glist_head; g != (Grph*) 0; g = g->g_next) {
586  g->g_val[pcnt] = hoc_run_expr(g->g_sexp);
587  }
588  pcnt++;
589  }
590 }
591 
592 static void plotflush(int contin) {
593  /* contin = 1 then flush after this will start with new points
594  contin = 2 then it will start with last points of this flush
595  */
596  int savcolor;
597  int i, savmode;
598  double parsav[NPARAM];
599  Grph* g;
600 
601  savmode = lastmode;
602  if (!initialized) {
603  do_setup();
604  }
605  for (i = 0; i < NPARAM; i++) {
606  parsav[i] = param[i];
607  }
608  savcolor = color;
609  for (g = glist_head; g != (Grph*) 0; g = g->g_next) {
610  for (i = 0; i < NPARAM; i++) {
611  param[i] = g->g_param[i];
612  }
613  if (color != g->g_color) {
614  IGNORE(set_color(g->g_color));
615  }
616  IGNORE(PLOT(1, 1, 0., 0.));
617  for (i = 0; i < pcnt; i++) {
618  IGNORE(PLOT(2, 0, lx[i], g->g_val[i]));
619  }
620  if (contin == 2) {
621  g->g_val[0] = g->g_val[pcnt - 1];
622  }
623  }
624  for (i = 0; i < NPARAM; i++) {
625  param[i] = parsav[i];
626  }
627  if (savcolor != color) {
628  IGNORE(set_color(savcolor));
629  }
630  if (contin == 2 && pcnt > 0) {
631  lx[0] = lx[pcnt - 1];
632  pcnt = 1;
633  IGNORE(PLOT(3, 1, xsav, ysav)); /* last point of explicit plot */
634  }
635  lastmode = savmode;
636  if (contin == 1) {
637  pcnt = 0;
638  }
639 }
640 
641 static void do_setup(void) {
642  Grph* g;
643  double parsav[NPARAM];
644  int i;
645  int savcolor;
646 
647  for (i = 0; i < NPARAM; i++) {
648  parsav[i] = param[i];
649  }
650  savcolor = color;
651  for (g = glist_head; g != (Grph*) 0; g = g->g_next) {
652  hoc_run_stmt(g->g_setup);
653  for (i = 0; i < NPARAM; i++) {
654  g->g_param[i] = param[i];
655  }
656  g->g_color = color;
657  }
658  for (i = 0; i < NPARAM; i++) {
659  param[i] = parsav[i];
660  }
661  if (savcolor != color) {
662  IGNORE(set_color(savcolor));
663  }
664  initialized = 1;
665 }
Symbol * hoc_parse_expr(const char *str, Symlist **psymlist)
Definition: code2.cpp:659
double hoc_run_expr(Symbol *sym)
Definition: code2.cpp:651
double * hoc_pgetarg(int narg)
Definition: code.cpp:1623
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
Definition: gui-redirect.h:58
#define getarg
Definition: hocdec.h:15
#define gargstr
Definition: hocdec.h:14
int ifarg(int)
Definition: code.cpp:1581
static int narg()
Definition: ivocvect.cpp:150
#define i
Definition: md1redef.h:12
#define IGNORE(arg)
Definition: model.h:247
#define Sprintf
Definition: model.h:233
#define Printf
Definition: model.h:237
floor
Definition: extdef.h:4
fabs
Definition: extdef.h:3
char * name
Definition: init.cpp:16
char * emalloc(unsigned n)
Definition: list.cpp:166
size_t j
static Symlist * graph_sym_list
Definition: axis.cpp:484
#define YO
Definition: axis.cpp:148
#define Ret(a)
Definition: axis.cpp:149
#define xlow
Definition: axis.cpp:160
static int PLOT(int, int, double, double)
Definition: axis.cpp:268
static int regraph_mode[1000]
Definition: axis.cpp:178
void hoc_regraph(void)
Definition: axis.cpp:189
#define WIDTH
Definition: axis.cpp:307
static int grphing
Definition: axis.cpp:172
void hoc_Plot(void)
Definition: axis.cpp:225
static double param[NPARAM]
Definition: axis.cpp:155
#define xorg
Definition: axis.cpp:156
static double regraph_x[1000]
Definition: axis.cpp:180
static double lastmode
Definition: axis.cpp:170
#define yorg
Definition: axis.cpp:157
#define XS
Definition: axis.cpp:145
static double ystart
Definition: axis.cpp:168
void hoc_ploty(void)
Definition: axis.cpp:301
static double xstart
Definition: axis.cpp:168
#define XO
Definition: axis.cpp:147
double(* nrnpy_object_to_double_)(Object *)
Definition: xmenu.cpp:14
static int regraph_index
Definition: axis.cpp:175
static void open_regraph(void)
Definition: axis.cpp:198
static double XORG
Definition: axis.cpp:167
struct Grph Grph
static double clip
Definition: axis.cpp:171
static int max_regraph_index
Definition: axis.cpp:176
static int SaveForRegraph
Definition: axis.cpp:174
void hoc_Graphmode(void)
Definition: axis.cpp:539
void hoc_axis(void)
Definition: axis.cpp:309
#define xscale
Definition: axis.cpp:158
#define ylow
Definition: axis.cpp:161
static void free_graph(void)
Definition: axis.cpp:557
static double YSIZE
Definition: axis.cpp:167
#define NPARAM
Definition: axis.cpp:154
static void plotstream(int, int, double)
Definition: axis.cpp:573
static int pcnt
Definition: axis.cpp:486
static void save_regraph_item(int narg, int mode, double x)
Definition: axis.cpp:214
static double YORG
Definition: axis.cpp:167
static void do_regraph(void)
Definition: axis.cpp:205
static double xinc
Definition: axis.cpp:169
static void close_regraph(void)
Definition: axis.cpp:202
static double XSIZE
Definition: axis.cpp:167
static double ystop
Definition: axis.cpp:168
static Grph * glist_head
Definition: axis.cpp:499
static double yinc
Definition: axis.cpp:169
#define yhigh
Definition: axis.cpp:163
static int regraph_color[1000]
Definition: axis.cpp:179
#define yscale
Definition: axis.cpp:159
static void plotflush(int)
Definition: axis.cpp:592
void hoc_Graph(void)
Definition: axis.cpp:501
static int regraph_narg[1000]
Definition: axis.cpp:177
static void do_setup(void)
Definition: axis.cpp:641
#define YS
Definition: axis.cpp:146
static double * lx
Definition: axis.cpp:488
static double * regraph_y[1000]
Definition: axis.cpp:181
static int initialized
Definition: axis.cpp:483
static int badgraph
Definition: axis.cpp:487
#define xhigh
Definition: axis.cpp:162
#define CLIP
Definition: axis.cpp:144
void hoc_plotx(void)
Definition: axis.cpp:296
#define HEIGHT
Definition: axis.cpp:308
#define ysav
Definition: axis.cpp:165
#define xsav
Definition: axis.cpp:164
static double xstop
Definition: axis.cpp:168
static Grph * glist_tail
Definition: axis.cpp:499
#define MAXCNT
Definition: axis.cpp:485
void hoc_run_stmt(Symbol *)
Definition: code2.cpp:685
void hoc_free_list(Symlist **)
Symbol * hoc_parse_stmt(const char *, Symlist **)
Definition: code2.cpp:692
#define g
Definition: passive0.cpp:21
#define e
Definition: passive0.cpp:22
int set_color(int c)
Definition: plot.cpp:868
#define color
Definition: rbtqueue.cpp:50
#define plt
Definition: redef.h:14
#define plprint
Definition: redef.h:110
unsigned int text_size
Definition: settext.cpp:12
unsigned int text_style
Definition: settext.cpp:12
unsigned int text_orient
Definition: settext.cpp:12
int newstyle
Definition: settext.cpp:11
#define NULL
Definition: sptree.h:16
Definition: axis.cpp:490
int g_color
Definition: axis.cpp:494
Symbol * g_setup
Definition: axis.cpp:493
double g_param[NPARAM]
Definition: axis.cpp:495
struct Grph * g_next
Definition: axis.cpp:491
Symbol * g_sexp
Definition: axis.cpp:492
double g_val[MAXCNT]
Definition: axis.cpp:496
Definition: hocdec.h:227
Definition: model.h:57
Definition: hocdec.h:84