3 #ifndef SZA_UTIL_PGUTIL_H
4 #define SZA_UTIL_PGUTIL_H
15 #include "carma/szapgutil/color_tab.h"
57 static int open(std::string device);
59 static void subplot(
int nx,
int ny);
60 static void advance();
62 static void setInteractive(
bool inter);
63 static void useXaxisTimeLabeling(
bool use);
65 static void greyScale(std::vector<double>& zdata,
int nx,
int ny,
66 double xmina=0,
double xmaxa=1,
double ymina=0,
double ymaxa=1,
67 double *flag=0,
double z1=0,
double z2=0,
68 char *xlab=
"",
char *ylab=
"",
char *title=
"",
char *unit=
"");
70 static void greyScale(
int ndata,
double *zdata,
int nx,
int ny,
71 double xmina=0,
double xmaxa=1,
double ymina=0,
double ymaxa=1,
72 double *flag=0,
double z1=0,
double z2=0,
73 char *xlab=
"",
char *ylab=
"",
char *title=
"",
char *unit=
"");
75 static void greyScale(
int ndata,
float *zdata,
int nx,
int ny,
76 float xmina=0,
float xmaxa=1,
float ymina=0,
float ymaxa=1,
77 float *flag=0,
float z1=0,
float z2=0,
78 char *xlab=
"",
char *ylab=
"",
char *title=
"",
char *unit=
"");
80 static void grayScale(
int ndata,
float *zdata,
int nx,
int ny,
81 float xmina=0,
float xmaxa=1,
float ymina=0,
float ymaxa=1,
82 float *flag=0,
float z1=0,
float z2=0,
83 char *xlab=
"",
char *ylab=
"",
char *title=
"",
char *unit=
"");
87 static void linePlot(std::vector<double>& xarr, std::vector<double>& yarr,
88 char* xlab=
"",
char* ylab=
"",
char* title=
"",
91 static void linePlot(
int narr,
double* xarr,
double* yarr,
92 char* xlab=
"",
char* ylab=
"",
char* title=
"",
95 static void linePlot(
int narr,
float* xarr,
float* yarr,
96 char* xlab=
"",
char* ylab=
"",
char* title=
"",
99 static void linePlot(std::vector<double>& yarr,
bool doLine=
true);
101 static void setOverplot(
bool overplot) {
102 overplot_ = overplot;
105 static void setWnad(
bool wnad) {
109 static void setWin(
bool win) {
113 static void setBox(
bool box) {
117 static void setVp(
bool vp) {
121 static void setTick(
bool tick) {
125 static void setLabel(
bool label) {
129 static void setWedge(
bool wedge) {
133 static void plotPoints(
bool plot) {
137 static void setViewport(
float xleft,
float xright,
float ybot,
float ytop);
139 static void setUsedefs(
bool usedefs) {
143 static void setXmin(
float xmin) {
147 static void setXmax(
float xmax) {
151 static void setYmin(
float ymin) {
155 static void setYmax(
float ymax) {
159 static void setColormap(std::string cmap);
161 static void queryDevice(
bool& wasopen);
162 static bool haveCursor();
164 static void wnad(
float xmin,
float xmax,
float ymin,
float ymax);
166 static void setMarkerColor(
int colorIndex) {
167 markerColor_ = colorIndex;
170 static int getMarkerColor() {
174 static void setMarkerSymbol(
int markerSymbol) {
175 markerSymbol_ = markerSymbol;
178 static void setMarkerSize(
float markerSize) {
179 markerSize_ = markerSize;
184 static int markerColor_;
185 static int markerSymbol_;
186 static float markerSize_;
187 static bool xaxisTimeLabeling_;
188 static bool interactive_;
190 static bool overplot_;
191 static bool plotPoints_;
199 static bool usedefs_;
200 static float xmin_, xmax_;
201 static float ymin_, ymax_;
205 static int v_grey2(
int ndata,
float *zdata,
int nx,
int ny,
206 float xmina=0,
float xmaxa=1,
float ymina=0,
float ymaxa=1,
207 float* flag=0,
float z1=0,
float z2=0,
208 char* xlab=
"",
char* ylab=
"",
char* title=
"",
char* unit=
"");
212 static int v_lplot(
int narr,
float* xarr,
float* yarr,
213 char* xlab=
"",
char* ylab=
"",
char* title=
"",
214 bool doLine=
true,
bool doErr=
false);
216 static int v_radplot(
float data[],
int nbin,
float rmin,
float rmax,
217 float xmin,
float xmax,
float ymin,
float ymax,
int nx,
int ny);
222 static int v_lnewx(
float xmins,
float xmaxs,
float ymins,
float ymaxs,
223 float *xmin,
float *xmax,
float *ymin,
float *ymax,
224 int narr,
float xarr[],
float yarr[]);
228 static int v_lwrite(
int narr,
float xarr[],
float yarr[],
float xmin,
229 float xmax,
float ymin,
float ymax);
233 static int v_lnum(
int narr,
float xarr[],
float yarr[],
float xmin,
234 float xmax,
float ymin,
float ymax);
238 static int v_lten(
int narr,
float xarr[],
float yarr[],
float xmin,
239 float xmax,
float ymin,
float ymax);
243 static int v_lzoom(
float xmins,
float xmaxs,
float ymins,
float ymaxs,
244 float *xmin,
float *xmax,
float *ymin,
float *ymax);
248 static int v_ldraw(
int narr,
float xarr[],
float yarr[],
249 std::string xlab, std::string ylab, std::string title,
250 bool doLine,
bool doErr,
251 double xmin,
double xmax,
double ymin,
double ymax);
253 static void pgpTxt(
float x,
float y,
float angle,
float fjust, std::string text);
263 #endif // End #ifndef SZA_UTIL_PGUTIL_H