1 #include <../../nrnconf.h> 149 # define Ret(a) hoc_ret(); hoc_pushx(a); 154 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] 183 static int PLOT(
int,
int,
double,
double);
238 }
else if (
ifarg(2)) {
242 }
else if (
ifarg(1)) {
248 }
else if (mode == -11) {
251 }
else if (mode == -12) {
256 Printf(
"plot(mode)\nplot(x, y)\nplot(mode, x, y\n");
257 Printf(
"axis()\naxis(clip)\naxis(xorg, xsize, yorg, ysize)\n");
258 Printf(
"axis(xstart, xstop, ntic, ystart, ystop, ntic)\n");
266 static int PLOT(
int narg,
int mode,
double x,
double y)
291 if (x <= xhigh && x >=
xlow && y <=yhigh && y >=
ylow) {
293 }
else if (mode > 0) {
335 static double xprec=.1, yprec=.1;
382 plt(2,i,y0);
plt(2,i,y0+10.);
plt(1,i,y0);
387 plt(2,x0,j);
plt(2,x0+10.,j);
plt(1,x0,j);
392 settextstyle(text_style,text_orient,text_size);
395 width = textwidth(
"O")*1.5;
396 height = textheight(
"O");
411 if (
fabs(x) < 1e-10) {
416 offset = width*(
int)strlen(s)/2;
417 if( i == x0 && y0 !=
YORG )
420 plt(1,i-offset,y0-height);
plt(-2,0.,0.);
422 plt(1,i-offset,y0-1.5*height);
plt(-2,0.,0.);
434 if (
fabs(y) < 1e-10) {
439 offset = width*(
int)strlen(s) + width;
441 if ( j == y0 && x0 !=
XORG )
443 plt(1, x0-offset, j+height);
445 plt(1, x0-offset, j+2.);
449 plt(1,x0-offset,j+height/2);
451 plt(1,x0-offset,j-6.);
509 if (glist_head == (
Grph *)0) {
515 if (glist_tail != (
Grph *)0) {
548 if (mode > 1 &&
pcnt > 0) {
559 for (g = glist_head; g != (
Grph *)0; g = gnext) {
567 glist_head = glist_tail = (
Grph *)0;
575 if (narg == 1 || narg == 3) {
582 if (narg == 2 || narg == 3) {
584 for (g = glist_head; g != (
Grph *)0; g = g->
g_next) {
605 for (i=0; i<
NPARAM; i++ ) {
609 for (g = glist_head; g != (
Grph *)0; g=g->
g_next) {
610 for (i=0; i<
NPARAM; i++) {
617 for (i=0; i<
pcnt; i++) {
624 for (i=0; i<
NPARAM; i++ ) {
627 if (savcolor !=
color) {
630 if (contin == 2 &&
pcnt > 0) {
647 for (i=0; i<
NPARAM; i++ ) {
651 for (g = glist_head; g != (
Grph *)0; g = g->
g_next) {
653 for (i=0; i<
NPARAM; i++ ) {
658 for (i=0; i<
NPARAM; i++ ) {
661 if (savcolor !=
color) {
static int regraph_mode[1000]
static int max_regraph_index
double(* nrnpy_object_to_double_)(Object *)
void hoc_free_list(Symlist **)
static void do_regraph(void)
static void close_regraph(void)
Symbol * hoc_parse_stmt(const char *, Symlist **)
static void plotflush(int)
static int regraph_narg[1000]
void hoc_run_stmt(Symbol *)
static double param[NPARAM]
static double regraph_x[1000]
static void plotstream(int, int, double)
double * hoc_pgetarg(int narg)
Symbol * hoc_parse_expr(const char *str, Symlist **psymlist)
static double * regraph_y[1000]
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
static Symlist * graph_sym_list
static void open_regraph(void)
double hoc_run_expr(Symbol *sym)
char * emalloc(unsigned n)
static void free_graph(void)
static int PLOT(int, int, double, double)
static void save_regraph_item(int narg, int mode, double x)
static int regraph_color[1000]
static int SaveForRegraph
static void do_setup(void)