% Dec. 5, 2003 %%%%%%%%%%%%%%%%%%%%%%% % Like for the main sitar code, I should probably be popping ISIS plot % routines into the Sherpa namespace. Or like for the Bayesian Blocks % example, use a Chips specific set of routines. I haven't done that % yet. First is the ISIS specific example, followed by the Sherpa one. #ifexists isis_exit public define asm_xyhplot(xlab,ylab,name,append,xlo,xhi,y,yerr, erron,linlog,plotit,pause) { variable id; if(plotit) { id = open_plot(strtrans(name," ","")+append+".ps/vcps"); resize(25,0.9); } label(xlab,ylab,strup(name)); charsize(1.2); set_line_width(3); if(linlog) { xlog; } else { xlin; } hplot(xlo,xhi,y); if(erron) { linestyle(4); line_or_color(0); linestyle(4); set_line_width(2); ohplot(xlo,xhi,y+yerr); linestyle(4); ohplot(xlo,xhi,y-yerr); line_or_color(1); linestyle(1); } if(plotit) { close_plot(id); } if(pause) { plot_pause; } return; } #endif #ifnexists isis_exit public define asm_xyhplot(xlab,ylab,name,append,xlo,xhi,y,yerr, erron,linlog,plotit,pause) { variable id; if(plotit) { id = _ns_ISIS->open_plot(strtrans(name," ","")+append+".ps/vcps"); _ns_ISIS->resize(25,0.9); } _ns_ISIS->label(xlab,ylab,strup(name)); _ns_ISIS->charsize(1.2); _ns_ISIS->set_line_width(3); if(linlog) { _ns_ISIS->xlog; } else { _ns_ISIS->xlin; } _ns_ISIS->hplot(xlo,xhi,y); if(erron) { _ns_ISIS->linestyle(4); _ns_ISIS->line_or_color(0); _ns_ISIS->linestyle(4); _ns_ISIS->set_line_width(2); _ns_ISIS->ohplot(xlo,xhi,y+yerr); _ns_ISIS->linestyle(4); _ns_ISIS->ohplot(xlo,xhi,y-yerr); _ns_ISIS->line_or_color(1); _ns_ISIS->linestyle(1); } if(plotit) { _ns_ISIS->close_plot(id); } if(pause) { _ns_ISIS->plot_pause; } return; } #endif %%%%%%%%%%%%%%%%%%%%%%% % Like for the main sitar code, I should probably be popping ISIS plot % routines into the Sherpa namespace. Or like for the Bayesian Blocks % example, use a Chips specific set of routines. I haven't done that % yet. First is the ISIS specific example, followed by the Sherpa one. #ifexists isis_exit public define asm_xyplot(xlab,ylab,name,append,x,y,linlog,plotit,pause) { variable id; if(plotit) { id = open_plot(strtrans(name," ","")+append+".ps/vcps"); resize(25,0.9); } label(xlab,ylab,strup(name)); charsize(1.2); set_line_width(3); if(linlog) { xlog; } else { xlin; } plot(x,y); if(plotit) { close_plot(id); } if(pause) { plot_pause; } return; } #endif #ifnexists isis_exit public define asm_xyplot(xlab,ylab,name,append,x,y,linlog,plotit,pause) { variable id; if(plotit) { id = _ns_ISIS->open_plot(strtrans(name," ","")+append+".ps/vcps"); _ns_ISIS->resize(25,0.9); } _ns_ISIS->label(xlab,ylab,strup(name)); _ns_ISIS->charsize(1.2); _ns_ISIS->set_line_width(3); if(linlog) { _ns_ISIS->xlog; } else { _ns_ISIS->xlin; } _ns_ISIS->plot(x,y); if(plotit) { _ns_ISIS->close_plot(id); } if(pause) { _ns_ISIS->plot_pause; } return; } #endif %%%%%%%%%%%%%%%%%%%%%%% #ifexists isis_exit public define asm_plot_range(xlo,xhi,ylo,yhi) { xrange(xlo,xhi); yrange(ylo,yhi); return; } #endif #ifnexists isis_exit public define asm_plot_range(xlo,xhi,ylo,yhi) { _ns_ISIS->xrange(xlo,xhi); _ns_ISIS->yrange(ylo,yhi); return; } #endif %%%%%%%%%%%%%%%%%%%%%%%