📄 xginitf.c
字号:
SCALAR *Z_Scale; /* scaling factor for the z array */ int *X_Auto_Rescale; /* if True X_Min and X_Max are neglected */ int *Y_Auto_Rescale; /* if True Y_Min and Y_Max are neglected */ int *Z_Auto_Rescale; /* if True Z_Min and Z_Max are neglected */ SCALAR *X_Min, *X_Max;/* x bounds for the plot if x-autorescale if False */ SCALAR *Y_Min, *Y_Max;/* y bounds for the plot if y-autorescale if False */ SCALAR *Z_Min, *Z_Max;/* z bounds for the plot if z-autorescale if False */{ int plottype; DataType data_ptr = NULL; LabelType label_ptr; init_theta = 0.0; init_phi = 0.0; label_ptr = SetupLabelStruct(); label_ptr->Z_Label = Z_Label; label_ptr->Z_Min = *Z_Min; label_ptr->Z_Max = *Z_Max; label_ptr->Z_Scale = *Z_Scale; label_ptr->Z_Auto_Rescale = *Z_Auto_Rescale; label_ptr->Y_Label = X_Label; label_ptr->Y_Min = *X_Min; label_ptr->Y_Max = *X_Max; label_ptr->Y_Scale = *X_Scale; label_ptr->Y_Auto_Rescale = *X_Auto_Rescale; label_ptr->X_Label = Y_Label; label_ptr->X_Min = *Y_Min; label_ptr->X_Max = *Y_Max; label_ptr->X_Scale = *Y_Scale; label_ptr->X_Auto_Rescale = *Y_Auto_Rescale; if (!strcmp(PlotType, "linlinlin")) plottype = LIN_LIN_LIN; else if (!strcmp(PlotType, "linlinlog")) plottype = LIN_LIN_LOG; else if (!strcmp(PlotType, "linloglin")) plottype = LOG_LIN_LIN; else if (!strcmp(PlotType, "linloglog")) plottype = LOG_LIN_LOG; else if (!strcmp(PlotType, "loglinlin")) plottype = LIN_LOG_LIN; else if (!strcmp(PlotType, "loglinlog")) plottype = LIN_LOG_LOG; else if (!strcmp(PlotType, "logloglin")) plottype = LOG_LOG_LIN; else if (!strcmp(PlotType, "logloglog")) plottype = LOG_LOG_LOG; else { printf("Unrecognized plot string '%s' for Window '%s'.\n", PlotType, Z_Label); exit(-1); } XGSetupWindow(Z_Label,State,*ulx,*uly,THREED,data_ptr,label_ptr, plottype);}/***********************************************************************/void#ifdef UNICOSSET2DCXGFLAG(PlotType, X_Label, Y_Label, Z_Label, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max,openFlag)#else#ifdef IBMset2dcxgflag(PlotType, X_Label, Y_Label, Z_Label, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max,openFlag)#else#ifdef HPset2dcxgflag(PlotType, X_Label, Y_Label, Z_Label, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max,openFlag)#elseset2dcxgflag_(PlotType, X_Label, Y_Label, Z_Label, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max,openFlag)#endif#endif#endif char *PlotType; /* "linlinlin", "linlinlog", "linloglog", etc. */ char *X_Label; /* x label for the frame */ char *Y_Label; /* y label for the frame */ char *Z_Label; /* z label for the frame */ char *State; /* "open" or "iconic" */ int *ulx, *uly; /* requested position of frame's upper left coner*/ SCALAR *X_Scale; /* scaling factor for the x array */ SCALAR *Y_Scale; /* scaling factor for the y array */ SCALAR *Z_Scale; /* scaling factor for the z array */ int *X_Auto_Rescale; /* if True X_Min and X_Max are neglected */ int *Y_Auto_Rescale; /* if True Y_Min and Y_Max are neglected */ int *Z_Auto_Rescale; /* if True Z_Min and Z_Max are neglected */ SCALAR *X_Min, *X_Max;/* x bounds for the plot if x-autorescale if False */ SCALAR *Y_Min, *Y_Max;/* y bounds for the plot if y-autorescale if False */ SCALAR *Z_Min, *Z_Max;/* z bounds for the plot if z-autorescale if False */ int *openFlag;{ int plottype; DataType data_ptr = NULL; LabelType label_ptr; init_theta = 0.0; init_phi = 0.0; label_ptr = SetupLabelStruct(); label_ptr->Z_Label = Z_Label; label_ptr->Z_Min = *Z_Min; label_ptr->Z_Max = *Z_Max; label_ptr->Z_Scale = *Z_Scale; label_ptr->Z_Auto_Rescale = *Z_Auto_Rescale; label_ptr->Y_Label = X_Label; label_ptr->Y_Min = *X_Min; label_ptr->Y_Max = *X_Max; label_ptr->Y_Scale = *X_Scale; label_ptr->Y_Auto_Rescale = *X_Auto_Rescale; label_ptr->X_Label = Y_Label; label_ptr->X_Min = *Y_Min; label_ptr->X_Max = *Y_Max; label_ptr->X_Scale = *Y_Scale; label_ptr->X_Auto_Rescale = *Y_Auto_Rescale; if (!strcmp(PlotType, "linlinlin")) plottype = LIN_LIN_LIN; else if (!strcmp(PlotType, "linlinlog")) plottype = LIN_LIN_LOG; else if (!strcmp(PlotType, "linloglin")) plottype = LOG_LIN_LIN; else if (!strcmp(PlotType, "linloglog")) plottype = LOG_LIN_LOG; else if (!strcmp(PlotType, "loglinlin")) plottype = LIN_LOG_LIN; else if (!strcmp(PlotType, "loglinlog")) plottype = LIN_LOG_LOG; else if (!strcmp(PlotType, "logloglin")) plottype = LOG_LOG_LIN; else if (!strcmp(PlotType, "logloglog")) plottype = LOG_LOG_LOG; else { printf("Unrecognized plot string '%s' for Window '%s'.\n", PlotType, Z_Label); exit(-1); } XGSetupWindow(Z_Label,State,*ulx,*uly,THREED,data_ptr,label_ptr, plottype); theWindowArray[numberOfWindows -1]->openFlag = openFlag;}/***********************************************************************/void#ifdef UNICOSSET3DXG(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max)#else#ifdef IBMset3dxg(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max)#else#ifdef HPset3dxg(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max)#elseset3dxg_(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max)#endif#endif#endif char *PlotType; /* "linlinlin", "linlinlog", "linloglog", etc. */ char *X_Label; /* x label for the frame */ char *Y_Label; /* y label for the frame */ char *Z_Label; /* z label for the frame */ SCALAR *Theta, *Phi; /* initial viewing angles */ char *State; /* "open" or "iconic" */ int *ulx, *uly; /* requested position of frame's upper left coner*/ SCALAR *X_Scale; /* scaling factor for the x array */ SCALAR *Y_Scale; /* scaling factor for the y array */ SCALAR *Z_Scale; /* scaling factor for the z array */ int *X_Auto_Rescale; /* if True X_Min and X_Max are neglected */ int *Y_Auto_Rescale; /* if True Y_Min and Y_Max are neglected */ int *Z_Auto_Rescale; /* if True Z_Min and Z_Max are neglected */ SCALAR *X_Min, *X_Max; /* x bounds for the plot if x-autorescale if False */ SCALAR *Y_Min, *Y_Max; /* y bounds for the plot if y-autorescale if False */ SCALAR *Z_Min, *Z_Max; /* z bounds for the plot if z-autorescale if False */{ int plottype; DataType data_ptr = NULL; LabelType label_ptr; init_theta = *Theta; init_phi = *Phi; label_ptr = SetupLabelStruct(); label_ptr->Z_Label = Z_Label; label_ptr->Z_Min = *Z_Min; label_ptr->Z_Max = *Z_Max; label_ptr->Z_Scale = *Z_Scale; label_ptr->Z_Auto_Rescale = *Z_Auto_Rescale; label_ptr->Y_Label = X_Label; label_ptr->Y_Min = *X_Min; label_ptr->Y_Max = *X_Max; label_ptr->Y_Scale = *X_Scale; label_ptr->Y_Auto_Rescale = *X_Auto_Rescale; label_ptr->X_Label = Y_Label; label_ptr->X_Min = *Y_Min; label_ptr->X_Max = *Y_Max; label_ptr->X_Scale = *Y_Scale; label_ptr->X_Auto_Rescale = *Y_Auto_Rescale; if (!strcmp(PlotType, "linlinlin")) plottype = LIN_LIN_LIN; else if (!strcmp(PlotType, "linlinlog")) plottype = LIN_LIN_LOG; else if (!strcmp(PlotType, "linloglin")) plottype = LOG_LIN_LIN; else if (!strcmp(PlotType, "linloglog")) plottype = LOG_LIN_LOG; else if (!strcmp(PlotType, "loglinlin")) plottype = LIN_LOG_LIN; else if (!strcmp(PlotType, "loglinlog")) plottype = LIN_LOG_LOG; else if (!strcmp(PlotType, "logloglin")) plottype = LOG_LOG_LIN; else if (!strcmp(PlotType, "logloglog")) plottype = LOG_LOG_LOG; else { printf("Unrecognized plot string '%s' for Window '%s'.\n", PlotType, Z_Label); exit(-1); } XGSetupWindow(Z_Label,State,*ulx,*uly,THREED,data_ptr,label_ptr,plottype);}/***********************************************************************/void#ifdef UNICOSSET3DXGFLAG(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max, openFlag)#else#ifdef IBMset3dxgflag(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max, openFlag)#else#ifdef HPset3dxgflag(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max, openFlag)#elseset3dxgflag_(PlotType, X_Label, Y_Label, Z_Label, Theta, Phi, State, ulx, uly, X_Scale, Y_Scale, Z_Scale, X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale, X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max, openFlag)#endif#endif#endif char *PlotType; /* "linlinlin", "linlinlog", "linloglog", etc. */ char *X_Label; /* x label for the frame */ char *Y_Label; /* y label for the frame */ char *Z_Label; /* z label for the frame */ SCALAR *Theta, *Phi; /* initial viewing angles */ char *State; /* "open" or "iconic" */ int *ulx, *uly; /* requested position of frame's upper left coner*/ SCALAR *X_Scale; /* scaling factor for the x array */ SCALAR *Y_Scale; /* scaling factor for the y array */ SCALAR *Z_Scale; /* scaling factor for the z array */ int *X_Auto_Rescale; /* if True X_Min and X_Max are neglected */ int *Y_Auto_Rescale; /* if True Y_Min and Y_Max are neglected */ int *Z_Auto_Rescale; /* if True Z_Min and Z_Max are neglected */ SCALAR *X_Min, *X_Max; /* x bounds for the plot if x-autorescale if False */ SCALAR *Y_Min, *Y_Max; /* y bounds for the plot if y-autorescale if False */ SCALAR *Z_Min, *Z_Max; /* z bounds for the plot if z-autorescale if False */ int *openFlag;{ int plottype; DataType data_ptr = NULL; LabelType label_ptr; init_theta = *Theta; init_phi = *Phi; label_ptr = SetupLabelStruct(); label_ptr->Z_Label = Z_Label; label_ptr->Z_Min = *Z_Min; label_ptr->Z_Max = *Z_Max; label_ptr->Z_Scale = *Z_Scale; label_ptr->Z_Auto_Rescale = *Z_Auto_Rescale; label_ptr->Y_Label = X_Label; label_ptr->Y_Min = *X_Min; label_ptr->Y_Max = *X_Max; label_ptr->Y_Scale = *X_Scale; label_ptr->Y_Auto_Rescale = *X_Auto_Rescale; label_ptr->X_Label = Y_Label; label_ptr->X_Min = *Y_Min; label_ptr->X_Max = *Y_Max; label_ptr->X_Scale = *Y_Scale; label_ptr->X_Auto_Rescale = *Y_Auto_Rescale; if (!strcmp(PlotType, "linlinlin")) plottype = LIN_LIN_LIN; else if (!strcmp(PlotType, "linlinlog")) plottype = LIN_LIN_LOG; else if (!strcmp(PlotType, "linloglin")) plottype = LOG_LIN_LIN; else if (!strcmp(PlotType, "linloglog")) plottype = LOG_LIN_LOG; else if (!strcmp(PlotType, "loglinlin")) plottype = LIN_LOG_LIN; else if (!strcmp(PlotType, "loglinlog")) plottype = LIN_LOG_LOG; else if (!strcmp(PlotType, "logloglin")) plottype = LOG_LOG_LIN; else if (!strcmp(PlotType, "logloglog")) plottype = LOG_LOG_LOG; else { printf("Unrecognized plot string '%s' for Window '%s'.\n", PlotType, Z_Label); exit(-1); } XGSetupWindow(Z_Label,State,*ulx,*uly,THREED,data_ptr,label_ptr,plottype); theWindowArray[numberOfWindows -1]->openFlag = openFlag;}/***********************************************************************/void#ifdef UNICOSCURVEXG(x_array, y_array, npoints, color)#else#ifdef IBMcurvexg(x_array, y_array, npoints, color)#else#ifdef HPcurvexg(x_array, y_array, npoints, color)#elsecurvexg_(x_array, y_array, npoints, color)#endif#endif#endif SCALAR *x_array; /* x_array to be plotted */ SCALAR *y_array; /* y_array to be plotted */ int *npoints; /* number of points in the x (and y) direction */ int *color; /* plot's color chosen from 0-9 */{ DataType data_prevptr, data_ptr; data_prevptr = theWindowArray[numberOfWindows -1]->data; data_ptr = SetupDataStruct(); data_ptr->y = y_array; data_ptr->x = x_array; data_ptr->npoints = npoints; data_ptr->color = *color; data_ptr->next = data_prevptr; theWindowArray[numberOfWindows -1]->data = data_ptr;}void#ifdef UNICOSSCAT2DXG(x_array, y_array, npoints, color)#else#ifdef IBMscat2dxg(x_array, y_array, npoints, color)#else#ifdef HPscat2dxg(x_array, y_array, npoints, color)#elsescat2dxg_(x_array, y_array, npoints, color)#endif#endif#endif SCALAR *x_array; /* x_array to be plotted */ SCALAR *y_array; /* y_array to be plotted */ int *npoints; /* number of points in the x (and y) direction */ int *color; /* plot's color chosen from 0-9 */{ DataType data_prevptr, data_ptr; data_prevptr = theWindowArray[numberOfWindows -1]->data; data_ptr = SetupDataStruct(); data_ptr->y = y_array; data_ptr->x = x_array; data_ptr->npoints = npoints; data_ptr->color = *color; data_ptr->next = data_prevptr; Set_Scatter(data_ptr); theWindowArray[numberOfWindows -1]->data = data_ptr;}/***********************************************************************/void#ifdef UNICOSSCAT3DXG(x_array, y_array, z_array, npoints, color)#else#ifdef IBMscat3dxg(x_array, y_array, z_array, npoints, color)#else#ifdef HPscat3dxg(x_array, y_array, z_array, npoints, color)#elsescat3dxg_(x_array, y_array, z_array, npoints, color)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -