Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_pg_analyzescatterms() fill multiple scatter chart environment</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _pg_analyzescatterms()  Fill multiple scatter chart environment

 #include   <pgchart.h>

 short _pg_analyzescatterms(env, xvals, yvals, nseries, n, rdim, slabels);
 chartenv _far *env;            Environment Variable
 float _far *xvals;             Array of x values
 float _far *yvals;             Array of y values
 short nseries;                 Number of series to chart
 short n;                       Number of data values to chart
 short rdim;                    Row dimension of data array
 char _far *_far *slabels;      Array of series labels

    _pg_analyscatterms() takes the values you supply in the arrays
    xvals and yvals and fills a chart environment variable
    with the default values for a multiseries scatter chart. All
    arguments in xvals and yvals are the same as those for
    _pg_chartscatterms().

    Returns:         0 for success; nonzero otherwise.

    Portability:     MS-DOS only, true MDPA, CGA, EGA, MCGA, or VGA video
                     compatibles

   -------------------------------- Example ---------------------------------

     Here _pg_analyzechartms() is used, but the same applies for
     _pg_analyzepie(), _pg_analyzechart(), _pg_analyzescatter(), and
     _pg_analyzescatterms().

    #include <conio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <graph.h>
    #include <pgchart.h>

    #define COUNTRIES 4
    #define MONTHS 4
    char _far *months[MONTHS] =  {"April", "May",  "June", "July"};
    char _far *country[COUNTRIES] = {"USA", "UK", "DDR", "USSR"};
    float _far mydata[COUNTRIES * MONTHS] =  {122.1,   311.2,   156.5,  211.5,
                                              121.1,   311.1,   234.3,  323.2,
                                              331.1,   123.4,   432.8,  312.4,
                                              443.3,   233.3,   233.1,  231.1};

    void main()
    {
        chartenv myenv;

        _setvideomode(_MAXRESMODE);
        _pg_initchart();

        _pg_defaultchart(&myenv, _PG_BARCHART, _PG_PLAINBARS);
        strcpy(myenv.maintitle.title, "Soybean Consumption");
        myenv.xaxis.autoscale = 1;  /* Set to true */

        _pg_analyzechartms(&myenv,months,mydata,COUNTRIES,MONTHS,
                                       MONTHS,country);
        _pg_chartms(&myenv, months, mydata, COUNTRIES, MONTHS,
                                       MONTHS, country);

        getch();
        }

See Also: _pg_chartscatter() _pg_defaultchart() _pg_initchart()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson