1 #include <../../nrnconf.h>
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]
183 static int PLOT(
int,
int,
double,
double);
236 }
else if (
ifarg(2)) {
241 }
else if (
ifarg(1)) {
248 }
else if (mode == -11) {
252 }
else if (mode == -12) {
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");
268 static int PLOT(
int narg,
int mode,
double x,
double y) {
278 }
else if (
narg == 2) {
288 if (x <= xhigh && x >=
xlow && y <= yhigh && y >=
ylow) {
290 }
else if (mode > 0) {
331 static double xprec = .1, yprec = .1;
346 }
else if (
ifarg(4)) {
351 }
else if (
ifarg(1)) {
396 width = textwidth(
"O") * 1.5;
397 height = textheight(
"O");
412 if (
fabs(x) < 1
e-10) {
417 offset = width * (int) strlen(s) / 2;
418 if (
i == x0 && y0 !=
YORG)
421 plt(1,
i - offset, y0 - height);
424 plt(1,
i - offset, y0 - 1.5 * height);
437 if (
fabs(y) < 1
e-10) {
442 offset = width * (int) strlen(s) + width;
444 if (
j == y0 && x0 !=
XORG)
446 plt(1, x0 - offset,
j + height);
448 plt(1, x0 - offset,
j + 2.);
452 plt(1, x0 - offset,
j + height / 2);
454 plt(1, x0 - offset,
j - 6.);
516 g->g_next = (
Grph*) 0;
517 g->g_sexp =
g->g_setup = (
Symbol*) 0;
550 if (mode > 1 &&
pcnt > 0) {
613 if (
color !=
g->g_color) {
621 g->g_val[0] =
g->g_val[
pcnt - 1];
627 if (savcolor !=
color) {
630 if (contin == 2 &&
pcnt > 0) {
661 if (savcolor !=
color) {
Symbol * hoc_parse_expr(const char *str, Symlist **psymlist)
double hoc_run_expr(Symbol *sym)
double * hoc_pgetarg(int narg)
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
char * emalloc(unsigned n)
static Symlist * graph_sym_list
static int PLOT(int, int, double, double)
static int regraph_mode[1000]
static double param[NPARAM]
static double regraph_x[1000]
double(* nrnpy_object_to_double_)(Object *)
static void open_regraph(void)
static int max_regraph_index
static int SaveForRegraph
static void free_graph(void)
static void plotstream(int, int, double)
static void save_regraph_item(int narg, int mode, double x)
static void do_regraph(void)
static void close_regraph(void)
static int regraph_color[1000]
static void plotflush(int)
static int regraph_narg[1000]
static void do_setup(void)
static double * regraph_y[1000]
void hoc_run_stmt(Symbol *)
void hoc_free_list(Symlist **)
Symbol * hoc_parse_stmt(const char *, Symlist **)