| Bsoft 2.0.5 Bernard's software package

ps_plot.cpp
Go to the documentation of this file.
1
9 #include "ps_plot.h"
10 #include "utilities.h"
11
12 #include <time.h>
13
14 // Declaration of global variables
15 extern int verbose; // Level of output to the screen
16
17
31 ofstream* ps_open_and_init(Bstring filename, Bstring title, int npages,
32 int width, int height)
33 {
34 if ( verbose & VERB_DEBUG )
35 cout << "DEBUG ps_open_and_init: title=" << title << " npages="
36 << npages << " width=" << width << " height=" << height << endl;
37
38 ofstream* fps = new ofstream(filename.c_str());
39
40 time_t t = time(NULL);
41
42 *fps << "%!PS-Adobe-2.0" << endl;
43 *fps << "%%Creator: Bsoft" << endl;
44 *fps << "%%CreationDate: " << asctime(localtime(&t));
45 *fps << "%%Title: " << title << endl;
46 *fps << "%%DocumentData: Clean7Bit" << endl;
47 *fps << "%%LanguageLevel: 2" << endl;
48 *fps << "%%Origin: 0 0" << endl;
49 *fps << "%%Pages: " << npages << endl;
50 *fps << "%%BoundingBox: 0 0 " << width << " " << height << endl;
51 *fps << "%%EndComments" << endl;
52 *fps << "%%BeginSetup" << endl;
53 *fps << "%%EndSetup" << endl;
54 *fps << "%%EndProlog" << endl;
55
56 return fps;
57 }
58
69 ofstream* ps_open_and_init(Bstring filename, Bplot* plot)
70 {
71 if ( verbose & VERB_DEBUG )
72 cout << "DEBUG ps_open_and_init: title=" << plot->title() << " npages="
73 << plot->pages() << " width=" << plot->page_width() << " height=" << plot->page_height() << endl;
74
75 ofstream* fps = new ofstream(filename.c_str());
76
77 time_t t = time(NULL);
78
79 *fps << "%!PS-Adobe-2.0" << endl;
80 *fps << "%%Creator: Bsoft" << endl;
81 *fps << "%%CreationDate: " << asctime(localtime(&t));
82 *fps << "%%Title: " << plot->title() << endl;
83 *fps << "%%DocumentData: Clean7Bit" << endl;
84 *fps << "%%LanguageLevel: 2" << endl;
85 *fps << "%%Origin: 0 0" << endl;
86 *fps << "%%Pages: " << plot->pages() << endl;
87 *fps << "%%BoundingBox: 0 0 " << plot->page_width() << " " << plot->page_height() << endl;
88 *fps << "%%EndComments" << endl;
89 *fps << "%%BeginSetup" << endl;
90 *fps << "%%EndSetup" << endl;
91 *fps << "%%EndProlog" << endl;
92
93 return fps;
94 }
95
104 int ps_close(ofstream* fps)
105 {
106 if ( verbose & VERB_DEBUG )
107 cout << "DEBUG ps_close" << endl;
108
109 *fps << "%%Trailer" << endl;
110 *fps << "%%EOF" << endl << endl;
111
112 fps->close();
113
114 delete fps;
115
116 return 0;
117 }
118
128 int ps_plot(Bstring filename, Bplot* plot)
129 {
130 if ( verbose )
131 cout << "Plotting a graph to " << filename << endl << endl;
132
133 ofstream* fps = ps_open_and_init(filename, plot);
134
135 for ( int i=1; i<=plot->pages(); i++ ) ps_graph(fps, plot, i);
136
137 ps_close(fps);
138
139 return 0;
140 }
141
148 Bplot* ps_read(Bstring& filename)
149 {
150 if ( filename.length() < 1 ) return NULL;
151
152 if ( verbose & VERB_PROCESS )
153 cout << "# Reading Postscript file: " << filename << endl;
154
155 Bplot* plot = NULL;
156
157 ifstream fps(filename.c_str());
158 if ( fps.fail() ) return plot;
159
160 char aline[1024];
161 long i(0), j;
162 int ncol(0), nrow(0);
163 Bstring sline;
164
165 // Title
166 while ( fps.getline(aline, 1024) && strncmp(aline, "%%Title:", 8) ) ;
167
168 Bstring title(aline);
169 title = title.substr(8,title.length());
170
171 // Start of data
172 while ( fps.getline(aline, 1024) && strncmp(aline, "/Data [", 7) ) ;
173
174 // Lables line
175 fps.getline(aline, 1024);
176 sline = aline;
177 Bstring* labels = sline.split();
178 Bstring* label;
179
180 // Determine number of rows and columns
181 while ( fps.getline(aline, 1024) && aline[0] != ']' ) {
182 if ( verbose & VERB_DEBUG )
183 cout << "DEBUG ps_read: aline = \"" << aline << "\"" << endl;
184 sline = aline;
185 sline = sline.substr(0, sline.length() - 1);
186 vector<double> temp = sline.split_into_doubles(0);
187 if ( ncol < temp.size() ) ncol = temp.size();
188 nrow++;
189 }
190
191 if ( verbose ) {
192 cout << "Plot file: " << filename << endl;
193 cout << "Columns: " << ncol << endl;
194 cout << "Rows: " << nrow << endl;
195 cout << "Labels: ";
196 }
197
198 plot = new Bplot(1, nrow, ncol);
199 plot->title(title);
200 plot->page(0).title(title);
201 plot->page(0).columns(ncol);
202 for ( i=0, label = labels; i<ncol; i++, label = label->next ) {
203 plot->page(0).column(i).number(i);
204 plot->page(0).column(i).label(*label);
205 if ( verbose )
206 cout << " " << *label;
207 }
208
209 if ( verbose )
210 cout << endl << endl;
211
212 string_kill(labels);
213
214 fps.seekg(0);
215
216 // Start of data
217 while ( fps.getline(aline, 1024) && strncmp(aline, "/Data [", 7) ) ;
218
219 // Lables line
220 fps.getline(aline, 1024);
221
222 // Read the data
223 i = 0;
224 while ( fps.getline(aline, 1024) && aline[0] != ']' ) {
225 if ( verbose & VERB_DEBUG )
226 cout << "DEBUG ps_read: aline = \"" << aline << "\"" << endl;
227 sline = aline;
228 vector<double> temp = sline.split_into_doubles(0);
229 for ( j=0; j<ncol; j++ ) (*plot)[j*nrow+i] = temp[j];
230 i++;
231 }
232
233 return plot;
234 }
235
246 int ps_graph(ofstream* fps, Bplot* plot, int page_number)
247 {
248 if ( page_number < 1 ) {
249 cerr << "Error in ps_graph: A page number less than 1 is not valid!" << endl;
250 bexit(-1);
251 }
252
253 plot->limits();
254
255 Bpage page = plot->page(page_number-1);
256
257 if ( verbose & VERB_DEBUG )
258 cout << "DEBUG ps_graph: starting page " << page.number() << endl;
259
260 if ( page.columns() < 2 ) {
261 cerr << "Error in ps_graph: At least two columns must be specified for page " << page.number() << endl;
262 return -1;
263 }
264
265 page.limits();
266
267 long i, j, left = plot->left(), bottom = plot->bottom(), width = plot->width(), height = plot->height();
268 long c, ncol(0), nrow(0), x_inverse, y_inverse, y2_inverse;
269 long max_row(32767);
270 Bstring x_label, y_label, y2_label, *txt;
271 double x_min, x_max, x_inc;
272 double y_min, y_max, y_inc;
273 double y2_min, y2_max, y2_inc;
274 double v_min, v_max;
275 double y_red(0), y_green(0), y_blue(0), y2_red(0), y2_green(0), y2_blue(0);
276 Bcolumn col;
277
278 nrow = plot->rows();
279 ncol = page.columns();
280
281 if ( verbose & VERB_DEBUG ) {
282 cout << "DEBUG ps_graph: page index = " << page_number-1 << " columns = " << ncol << endl;
283 cout << "DEBUG ps_graph: indices =";
284 for ( i=0; i<ncol; i++ ) cout << " " << page.column(i).number();
285 cout << endl;
286 cout << "DEBUG ps_graph: axes =";
287 for ( i=0; i<ncol; i++ ) cout << " " << page.column(i).axis();
288 cout << endl;
289 }
290
291 x_min = page.axis(1).min();
292 x_max = page.axis(1).max();
293 x_inc = page.axis(1).inc();
294 x_inverse = page.axis(1).flags() & 1;
295 y_min = page.axis(3).min();
296 y_max = page.axis(3).max();
297 y_inc = page.axis(3).inc();
298 y_inverse = page.axis(3).flags() & 1;
299 y2_min = page.axis(4).min();
300 y2_max = page.axis(4).max();
301 y2_inc = page.axis(4).inc();
302 y2_inverse = page.axis(4).flags() & 1;
303 v_min = page.axis(5).min();
304 v_max = page.axis(5).max();
305
306 // cout << "v_min = " << v_min << " v_max = " << v_max << endl;
307
308 x_label = page.axis(1).label();
309 y_label = page.axis(3).label();
310 y2_label = page.axis(4).label();
311
312 for ( i=0; i<ncol; i++ ) {
313 col = page.column(i);
314 if ( col.axis() == 1 ) {
315 if ( x_label.length() < 1 ) x_label = col.label();
316 } else if ( col.axis() == 3 ) {
317 if ( y_label.length() < 1 ) y_label = col.label();
318 y_red = col.red();
319 y_green = col.green();
320 y_blue = col.blue();
321 } else if ( col.axis() == 4 ) {
322 if ( y2_label.length() < 1 ) y2_label = col.label();
323 y2_red = col.red();
324 y2_green = col.green();
325 y2_blue = col.blue();
326 }
327 }
328
329 long hw = (int) (width*1.0/nrow); // Histogram bar width
330 if ( hw < 1 ) hw = 1;
331 long hhw = hw/2;
332
333 long x_digits = (long) (3 - log(x_max - x_min)/log(10));
334 long y_digits = (long) (3 - log(y_max - y_min)/log(10));
335 long y2_digits = (long) (3 - log(y2_max - y2_min)/log(10));
336
337 *fps << "%%Page: " << page.number() << " " << page.number() << endl;
338 *fps << "/Helvetica findfont 14 scalefont setfont" << endl;
339 *fps << "40 740 moveto (" << page.title() << ") show" << endl;
340 *fps << "/Left " << left << " def" << endl;
341 *fps << "/Bottom " << bottom << " def" << endl;
342 *fps << "/Height " << height << " def" << endl;
343 *fps << "/Width " << width << " def" << endl;
344 *fps << setprecision(4) << "/x_Min " << x_min << " def" << endl;
345 *fps << "/y_Min " << y_min << " def" << endl;
346 *fps << "/y2_Min " << y2_min << " def" << endl;
347 *fps << "/v_Min " << v_min << " def" << endl;
348 *fps << "/x_Max " << x_max << " def" << endl;
349 *fps << "/y_Max " << y_max << " def" << endl;
350 *fps << "/y2_Max " << y2_max << " def" << endl;
351 *fps << "/v_Max " << v_max << " def" << endl;
352 *fps << "/x_Scale Width x_Max x_Min sub div def" << endl;
353 *fps << "/y_Scale Height y_Max y_Min sub div def" << endl;
354 *fps << "/y2_Scale Height y2_Max y2_Min sub div def" << endl;
355 // *fps << "/v_Scale Height v_Max v_Min sub div def" << endl;
356 *fps << "/v_Scale 1 v_Max v_Min sub div def" << endl;
357 *fps << "/Ncol " << ncol << " def" << endl;
358 *fps << "/Frame { newpath 0 0 moveto 0 Height lineto Width Height lineto Width 0 lineto closepath } def" << endl;
359
360 *fps << "/Data [" << endl;
361 *fps << "%";
362 for ( j=0; j<ncol; j++ ) {
363 col = page.column(j);
364 *fps << col.label() << " ";
365 }
366 *fps << endl;
367 *fps << setprecision(8);
368 for ( i=0; i<nrow && i<max_row; i++ ) {
369 for ( j=0; j<ncol; j++ ) {
370 c = page.column(j).number();
371 // cout << c << ":" << i << " " << (*plot)[c*nrow+i] << endl;
372 *fps << (*plot)[c*nrow+i] << " ";
373 }
374 *fps << endl;
375 }
376 *fps << "] def" << endl;
377
378 *fps << "/Helvetica findfont 12 scalefont setfont" << endl;
379 for ( i=140, txt = page.text(); txt; txt = txt->next, i-=18 )
380 *fps << "40 " << i << " moveto (" << *txt << ") show" << endl;
381
382 *fps << "/Helvetica findfont 14 scalefont setfont" << endl;
383 *fps << "/DeviceRGB setcolorspace" << endl;
384 *fps << "0 0 0 setcolor" << endl;
385
386 if ( x_label.length() )
387 *fps << left+(width-6*x_label.length())/2 << " " << bottom-40 <<
388 " moveto (" << x_label << ") show" << endl;
389
390 if ( y_label.length() ) {
391 *fps << y_red << " " << y_green << " " << y_blue << " setcolor" << endl;
392 *fps << left-40 << " " << bottom+(height-6*y_label.length())/2 <<
393 " moveto gsave 90 rotate (" << y_label << ") show grestore" << endl;
394 }
395
396 if ( y2_label.length() ) {
397 *fps << y2_red << " " << y2_green << " " << y2_blue << " setcolor" << endl;
398 *fps << left+width+35 << " " << bottom+(height-6*y2_label.length())/2 <<
399 " moveto gsave -90 rotate (" << y2_label << ") show grestore" << endl;
400 }
401
402 *fps << "0 0 0 setcolor" << endl;
403
404 ps_scale(fps, left, bottom, left+width, bottom, x_min, x_max, x_inc,
405 10, M_PI_2, x_digits, 10, x_inverse);
406
407 ps_scale(fps, left, bottom, left, bottom+height, y_min, y_max, y_inc,
408 10, 0, y_digits, 10, y_inverse);
409
410 if ( y2_label.length() )
411 ps_scale(fps, left+width, bottom, left+width, bottom+height, y2_min, y2_max, y2_inc,
412 10, M_PI, y2_digits, 10, y2_inverse);
413
414 *fps << "gsave" << endl;
415 *fps << " /DeviceRGB setcolorspace" << endl;
416 *fps << " Left Bottom translate Frame stroke Frame clip" << endl;
417 *fps << " /y 0 y_Min sub y_Scale mul def" << endl;
418 *fps << " 0 y moveto Width y lineto stroke" << endl;
419 *fps << " /x 0 x_Min sub x_Scale mul def" << endl;
420 *fps << " x 0 moveto x Height lineto stroke" << endl;
421
422 for ( i=0; i<ncol; i++ ) {
423 col = page.column(i);
424 if ( col.axis() == 3 || col.axis() == 4 ) {
425 *fps << " " << col.red() << " " << col.green() << " " << col.blue() << " setcolor" << endl;
426 *fps << " /x Data 0 get x_Min sub x_Scale mul def" << endl;
427 *fps << " /y Data " << i << " get y_Min sub y_Scale mul def" << endl;
428 *fps << " x y moveto" << endl;
429 *fps << " Ncol Ncol Data length Ncol sub {" << endl;
430 *fps << " /x_Index exch def" << endl;
431 *fps << " /y_Index x_Index " << i << " add def" << endl;
432 if ( col.type() == 3 ) *fps << " /py_Index y_Index 1 sub def" << endl;
433 if ( col.type() == 4 ) *fps << " /v_Index y_Index 1 add def" << endl;
434 *fps << " /x Data x_Index get x_Min sub x_Scale mul def" << endl;
435 if ( col.axis() == 3 ) {
436 if ( col.type() == 3 ) *fps << " /y Data y_Index get y_Scale mul def" << endl;
437 else *fps << " /y Data y_Index get y_Min sub y_Scale mul def" << endl;
438 } else *fps << " /y Data y_Index get y2_Min sub y2_Scale mul def" << endl;
439 if ( col.type() == 3 ) *fps << " /py Data py_Index get y_Min sub y_Scale mul def" << endl;
440 *fps << " /w " << hw << " def" << endl;
441 *fps << " /xm x " << hhw << " sub def" << endl;
442 // if ( col.type() == 4 ) *fps << " /v Data v_Index get v_Min sub v_Scale mul def" << endl;
443 if ( col.type() == 4 ) {
444 *fps << " /v v_Max Data v_Index get sub v_Scale mul def" << endl;
445 *fps << " v setgray" << endl;
446 }
447 switch ( col.type() ) {
448 case 1: *fps << " xm 0 w y rectstroke" << endl; break; // bar
449 case 2: *fps << " x y lineto" << endl; break; // line
450 case 3: // std line
451 *fps << " x py y sub moveto 0 y 2 mul rlineto" << endl;
452 *fps << " x 3 sub py y sub moveto 6 0 rlineto" << endl;
453 *fps << " x 3 sub py y add moveto 6 0 rlineto" << endl;
454 break;
455 case 4: *fps << " x y 5 0 360 arc fill" << endl; break; // variable circle
456 default: *fps << " x y " << col.element_size() << " 0 360 arc fill" << endl; // circle
457 }
458 *fps << " } for stroke" << endl;
459 }
460 }
461 *fps << "grestore" << endl;
462 *fps << "showpage" << endl;
463
464 if ( verbose & VERB_DEBUG )
465 cout << "DEBUG ps_graph: finished page " << page.number() << endl;
466
467 return nrow;
468 }
469
487 int ps_scale(ofstream* fps, double x1, double y1, double x2, double y2,
488 double min, double max, double increment,
489 double tick_length, double tick_angle,
490 int digits, int fontsize, int inverse)
491 {
492 long i, j;
493 double value, showval;
494 double x_tick = tick_length*cos(tick_angle);
495 double y_tick = tick_length*sin(tick_angle);
496 double x_step = (x2-x1)*increment/(max - min);
497 double y_step = (y2-y1)*increment/(max - min);
498
499 if ( digits < 0 ) digits = 0;
500 if ( fontsize < 2 ) fontsize = 10;
501
502 long integer_size = (int) (log(fabs(max))/log(10.0) + 1);
503 if ( fabs(max) < fabs(min) ) integer_size = (int) (log(fabs(min))/log(10.0) + 1);
504 if ( inverse ) {
505 if ( min <= 0 ) integer_size = (int) (log(fabs(10/max))/log(10.0) + 1);
506 else integer_size = (int) (log(fabs(1/min))/log(10.0) + 1);
507 }
508 if ( integer_size < 1 ) integer_size = 1;
509 integer_size++; // Add one for the sign
510
511 long number_size = integer_size + 1 + digits;
512 double x_offset = x1 - number_size*fontsize/5;
513 double y_offset = y1 - fontsize/3;
514 if ( x2 - x1 > y2 - y1 )
515 y_offset -= fontsize;
516 else
517 x_offset -= number_size*fontsize/3;
518
519 if ( tick_angle > 0.75*M_PI && tick_angle < 1.25*M_PI )
520 x_offset = x1 + fontsize/5;
521
522 if ( verbose & VERB_DEBUG ) {
523 cout << "DEBUG ps_scale: min=" << min << " max=" << max << " increment=" << increment << endl;
524 cout << "DEBUG ps_scale: number_size=" << number_size << " digits=" << digits << endl;
525 }
526
527 // Ticks and labels
528 *fps << "/Helvetica findfont " << fontsize << " scalefont setfont " << endl;
529 for ( i=0, value=min; value<max+0.01*increment; value+=increment, i++ ) {
530 *fps << x1+i*x_step << " " << y1+i*y_step << " moveto " <<
531 x1+i*x_step+x_tick << " " << y1+i*y_step+y_tick << " lineto stroke" << endl;
532 showval = value;
533 if ( inverse && value ) { if ( value ) showval = 1/value; else showval = 999; }
534 // cout << showval << endl;
535 *fps << x_offset + i*x_step << " " << y_offset + i*y_step << " moveto ("
536 << fixed << setprecision(digits) << right << setw(number_size) << showval << ") (";
537 for ( j=0; j<integer_size; j++ ) *fps << "x";
538 *fps << ".";
539 for ( j=0; j<digits; j++ ) *fps << "x";
540 *fps << ") cvs show" << endl;
541 }
542
543 fps->unsetf(fps->flags());
544
545 return 0;
546 }
547
557 Bplot* plot_curve(long nrow, double* c0, double* c1, double* c2, double* c3)
558 {
559 int ncol(4);
560 Bstring title("Curve");
561 Bplot* plot = new Bplot(1, nrow, ncol);
562 plot->title(title);
563 plot->page(0).title(title);
564 plot->page(0).columns(ncol);
565 for ( int i=0; i<ncol; i++ ) plot->page(0).column(i).number(i);
566 plot->page(0).column(0).label("x");
567 plot->page(0).column(0).axis(1);
568 plot->page(0).column(1).type(2);
569 plot->page(0).column(1).label("y");
570 plot->page(0).column(1).axis(3);
571 plot->page(0).column(2).type(2);
572 plot->page(0).column(2).label("f");
573 plot->page(0).column(2).axis(3);
574 plot->page(0).column(3).type(2);
575 plot->page(0).column(3).label("c");
576 plot->page(0).column(3).axis(3);
577 plot->page(0).column(1).color(1,0,0);
578 plot->page(0).column(2).color(0,0,1);
579 plot->page(0).column(3).color(0,1,0);
580 // plot->page(0).axis(1).min(0);
581 // plot->page(0).axis(1).max(nrow);
582 // plot->page(0).axis(3).min(prad->minimum());
583 // plot->page(0).axis(3).max(prad->maximum());
584
585 for ( int i=0, j=nrow, k=j+nrow, l=k+nrow; i<nrow; i++, j++, k++, l++ ) {
586 if ( c0 ) (*plot)[i] = c0[i];
587 if ( c1 ) (*plot)[j] = c1[i];
588 if ( c2 ) (*plot)[k] = c2[i];
589 if ( c3 ) (*plot)[l] = c3[i];
590 }
591
592 return plot;
593 }
594
Baxis::inc
double inc()
Definition: Bplot.h:34
ps_read
Bplot * ps_read(Bstring &filename)
Reads a postscript file with a data table.
Definition: ps_plot.cpp:148
M_PI_2
#define M_PI_2
Definition: utilities.h:62
Baxis::label
Bstring & label()
Definition: Bplot.h:28
Bplot::width
long width()
Definition: Bplot.h:196
Baxis::min
double min()
Definition: Bplot.h:30
Bstring::substr
Bstring substr(long start, long len)
Definition: Bstring.cpp:324
Bplot::title
Bstring & title()
Definition: Bplot.h:189
ps_plot
int ps_plot(Bstring filename, Bplot *plot)
Generates postscript graphs.
Definition: ps_plot.cpp:128
Bcolumn::element_size
double element_size()
Definition: Bplot.h:74
utilities.h
Header file for general utilities.
VERB_DEBUG
#define VERB_DEBUG
Definition: utilities.h:112
Bcolumn::label
Bstring & label()
Definition: Bplot.h:63
ps_scale
int ps_scale(ofstream *fps, double x1, double y1, double x2, double y2, double min, double max, double increment, double tick_length, double tick_angle, int digits, int fontsize, int inverse)
Generates a scale for a postscript graph.
Definition: ps_plot.cpp:487
Bplot::pages
void pages(long n)
Definition: Bplot.h:201
Bstring::length
long length() const
Definition: Bstring.cpp:263
Bpage::limits
void limits()
Definition: Bplot.h:123
Bplot::page_height
long page_height()
Definition: Bplot.h:194
VERB_PROCESS
#define VERB_PROCESS
Definition: utilities.h:107
Bcolumn::color
double * color()
Definition: Bplot.h:76
Bplot::page_width
long page_width()
Definition: Bplot.h:193
ps_open_and_init
ofstream * ps_open_and_init(Bstring filename, Bstring title, int npages, int width, int height)
Opens and initializes a postscript file.
Definition: ps_plot.cpp:31
Bpage::column
Bcolumn & column(long i)
Definition: Bplot.h:110
Bcolumn::blue
double blue()
Definition: Bplot.h:80
Baxis::max
double max()
Definition: Bplot.h:32
verbose
int verbose
M_PI
#define M_PI
Definition: utilities.h:59
plot_curve
Bplot * plot_curve(long nrow, double *c0, double *c1, double *c2, double *c3)
Generates 1-3 line plot.
Definition: ps_plot.cpp:557
Bplot::limits
void limits()
Definition: Bplot.h:219
Bcolumn::number
long number()
Definition: Bplot.h:61
Bstring::next
Bstring * next
Definition: Bstring.h:31
Bcolumn::type
long type()
Definition: Bplot.h:66
Bpage::text
Bstring * text()
Definition: Bplot.h:121
Bpage::axis
Baxis & axis(long id)
Definition: Bplot.h:117
Bcolumn::red
double red()
Definition: Bplot.h:78
Bpage::title
Bstring & title()
Definition: Bplot.h:100
Bcolumn
Definition: Bplot.h:42
Bpage
Definition: Bplot.h:83
Bstring::split_into_doubles
vector< double > split_into_doubles(const Bstring &delim)
Definition: Bstring.cpp:665
Bstring::c_str
const char * c_str()
Definition: Bstring.h:70
Bcolumn::green
double green()
Definition: Bplot.h:79
ps_close
int ps_close(ofstream *fps)
Closes a postscript file.
Definition: ps_plot.cpp:104
Baxis::flags
long flags()
Definition: Bplot.h:38
Bstring
Definition: Bstring.h:29
Bplot::rows
void rows(long n)
Definition: Bplot.h:207
Bplot::page
Bpage & page(long i)
Definition: Bplot.h:211
ps_plot.h
Header file for postscript output functions.
Bpage::number
void number(long n)
Definition: Bplot.h:103
Bplot::height
long height()
Definition: Bplot.h:197
Bpage::columns
void columns(long ncol)
Definition: Bplot.h:105
Bplot::left
long left()
Definition: Bplot.h:199
bexit
int bexit(int value)
Exit function for cleanup and debugging.
Definition: utilities.cpp:273
Bcolumn::axis
long axis()
Definition: Bplot.h:68
ps_graph
int ps_graph(ofstream *fps, Bplot *plot, int page_number)
Generates postscript graphs.
Definition: ps_plot.cpp:246
Bstring::split
Bstring * split()
Definition: Bstring.cpp:597
string_kill
int string_kill(Bstring *list)
Kills a string linked list.
Definition: Bstring.cpp:760
Bplot
Definition: Bplot.h:146
Bplot::bottom
long bottom()
Definition: Bplot.h:200