~ubuntu-branches/ubuntu/saucy/argyll/saucy

« back to all changes in this revision

Viewing changes to plot/plot.c

  • Committer: Package Import Robot
  • Author(s): Christian Marillat
  • Date: 2012-04-25 07:46:07 UTC
  • mfrom: (1.2.2) (13.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120425074607-yjqadetw8kum9skc
Tags: 1.4.0-4
Should Build-Depends on libusb-dev (Closes: #670329).

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#define DEFWHEIGHT 500
49
49
 
50
50
/* Graph order is Black = Y1, Red = Y2, Green = Y3, Blue = Y4, Yellow = Y5, Purple = Y6 */
51
 
/* Brown = Y7, Orange = Y8, Grey = Y9, White = Y10  */
 
51
/* Brown = Y7, Orange = Y8, Grey = Y9, Magenta = Y10  */
52
52
 
53
53
double nicenum(double x, int round);
54
54
 
65
65
        { 136,  86,  68},       /* Brown */
66
66
        { 248,  95,   0},       /* Orange */
67
67
        { 160, 160, 160},       /* Grey */
68
 
        { 220, 220, 220}        /* White */
 
68
        { 220, 30,  220}        /* Magenta */
69
69
};
70
70
 
71
71
/* Information defining plot */
476
476
double *y8,     /* Orange */
477
477
double *y9,     /* Grey */
478
478
double *y10,/* White */
479
 
int n) {        /* Number of values */
 
479
int n,          /* Number of values */
 
480
int zero        /* Flag - make sure zero is in y range */
 
481
) {
480
482
        int i, j;
481
483
        double xmin, xmax, ymin, ymax;
482
484
        int nn = abs(n);
493
495
        yy[5] = y6;
494
496
        yy[6] = y7;
495
497
        yy[7] = y8;
496
 
        yy[9] = y9;
497
 
        yy[5] = y10;
 
498
        yy[8] = y9;
 
499
        yy[9] = y10;
498
500
 
499
501
        /* Determine min and max dimensions of plot */
500
502
        xmin = ymin = 1e6;
516
518
                }
517
519
        }
518
520
 
 
521
        if (zero && ymin > 0.0)
 
522
                ymin = 0.0;
 
523
                
519
524
        /* Work out scale factors */
520
525
        if ((xmax - xmin) == 0.0)
521
526
                xmax += 0.5, xmin -= 0.5;
2406
2411
                                freopen("CONOUT$","wb",stderr);
2407
2412
                        if (_fileno(stdin) < 0)
2408
2413
                                freopen("CONIN$","rb",stdin);
 
2414
#ifdef __cplusplus 
 
2415
                        // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog point to console as well
 
2416
                        std::ios::sync_with_stdio();
 
2417
#endif
2409
2418
                }
2410
2419
        }
2411
2420
#endif /* TEST_NON_CONSOLE */
2441
2450
        *stderr = *fp;
2442
2451
        setvbuf(stderr, NULL, _IONBF, 0);
2443
2452
 
2444
 
#ifdef __cplusplus 
2445
 
        // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog point to console as well
2446
 
        std::ios::sync_with_stdio();
2447
 
#endif
2448
2453
 
2449
2454
}
2450
2455
#endif // NEVER