1 #include <../../nrnconf.h>
139 #include "utils/logger.hpp"
153 #define xorg param[0]
154 #define yorg param[1]
155 #define xscale param[2]
156 #define yscale param[3]
157 #define xlow param[4]
158 #define ylow param[5]
159 #define xhigh param[6]
160 #define yhigh param[7]
161 #define xsav param[8]
162 #define ysav param[9]
180 static int PLOT(
int,
int,
double,
double);
233 }
else if (
ifarg(2)) {
238 }
else if (
ifarg(1)) {
245 }
else if (mode == -11) {
249 }
else if (mode == -12) {
255 Printf(
"plot(mode)\nplot(x, y)\nplot(mode, x, y\n");
256 Printf(
"axis()\naxis(clip)\naxis(xorg, xsize, yorg, ysize)\n");
257 Printf(
"axis(xstart, xstop, ntic, ystart, ystop, ntic)\n");
265 static int PLOT(
int narg,
int mode,
double x,
double y) {
275 }
else if (
narg == 2) {
285 if (x <= xhigh && x >=
xlow && y <= yhigh && y >=
ylow) {
287 }
else if (mode > 0) {
323 }
else if (
ifarg(4)) {
328 }
else if (
ifarg(1)) {
373 if (
fabs(x) < 1e-10) {
377 offset = width * (int) strlen(
s) / 2;
378 if (
i == x0 && y0 !=
YORG)
380 hoc_plt(1,
i - offset, y0 - 1.5 * height);
386 if (
fabs(y) < 1e-10) {
390 offset = width * (int) strlen(
s) + width;
392 if (
j == y0 && x0 !=
XORG)
489 if (mode > 1 &&
pcnt > 0) {
569 if (contin == 2 &&
pcnt > 0) {
void hoc_plprint(const char *)
void hoc_run_stmt(Symbol *sym)
void hoc_plt(int, double, double)
Symbol * hoc_parse_expr(const char *str, Symlist **psymlist)
double hoc_run_expr(Symbol *sym)
void hoc_free_list(Symlist **)
double * hoc_pgetarg(int narg)
Symbol * hoc_parse_stmt(const char *str, Symlist **psymlist)
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
static void * emalloc(size_t size)
int Sprintf(char(&buf)[N], const char *fmt, Args &&... args)
Redirect sprintf to snprintf if the buffer size can be deduced.
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]
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]
int Printf(const char *fmt, Args... args)