# Ox Graphics Function Reference

## Chapter contents:

CloseDrawWindow | Draw | DrawAcf | DrawAdjust
DrawAxis | DrawAxisAuto | DrawBoxPlot | DrawCorrelogram
DrawDensity | DrawHistogram | DrawLegend | DrawLine
DrawMatrix | DrawPLine | DrawPSymbol | DrawPText
DrawQQ | DrawSpectrum | DrawSymbol | DrawT
DrawText | DrawTitle | DrawTMatrix | DrawX
DrawXMatrix | DrawXYZ | DrawZ | SaveDrawWindow
SetDraw | SetDrawWindow | SetTextWindow | ShowDrawWindow

Tables:

Default line and pallete attributes
Symbol types
Line types

### Table draw.1: Default line attributes

    index    color           line type  width   symbol   size

     0       white            solid      10     plus     90
     1       black            solid       6     plus     90
     2       red              solid      10     plus     90
     3       blue             solid      10     box      90
     4       blue/green       solid      10     circle   90
     5       purple           dotted     10     plus     90
     6       green            dotted     10     plus     90
     7       brown/yellow     long dash  10     plus     90
     8       dark purple      long dash  10     plus     90
     9       pastel yellow    dotted     10     plus     90
    10       pastel green     dotted     10     plus     90
    11       pastel blue      solid      10     plus     90
    12                        solid      10     plus     90
    13       light grey       solid      10     plus     90
    14       grey             solid      10     plus     90
    15       light grey       solid      10     plus     90

    palette  color      (palette is for 3D surface and error fans)
    -1       wireframe
     0       white
     1       gray
     2       red
     3       blue
     4       blue/green
     5       purple
     6       green
     7       brown/yellow

### Table draw.2: Symbol types

        PL_FILLBOX    filled box        PL_FILLCIRCLE    filled circle
        PL_BOX        open box          PL_TRIANGLE      triangle
        PL_PLUS       plus              PL_FILLTRIANGLE  filled triangle
        PL_DASH       dash              PL_DIAMOND       diamond
        PL_CIRCLE     circle            PL_FILLDIAMOND   filled diamond
        PL_LINE       no symbol         PL_CROSS         cross

### Table draw.3: Line types

        TP_SOLID     solid line
        TP_DOTTED    dotted line
        TP_DASHED    dashed line
        TP_LDASHED   long-dashed line
        TP_USER      user-defined line

## CloseDrawWindow

    #include <oxdraw.h>
    CloseDrawWindow();

No return value.

Starts a new draw window for subsequent graphs. Note that the GiveWin graphics window will remain active there. A call to `ShowDrawDrawing` also clears the graphics buffer, so does not need to be followed by a call to `CloseDrawWindow`.

## Draw

    #include <oxdraw.h>
    Draw(const iArea, const mYt);
    Draw(const iArea, const mYt, const dXfirst, const dXstep);

  `iArea`
    in: int, area index
  `mYt`
    in: m `x` T matrix with m rows of data
  `dXfirst`
    in: (optional) double, X-value of first observation, x, default is 1
  `dXstep`
    in: (optional) double, gap between X-values, dx, default is 1

No return value.

This function draws m variables against an X variable, where the X variable consists of evenly spaced observations x, x+dx, x+2dx, x+3dx, .... Each variable is drawn by linking up the points. The first line index is 2.

## DrawAcf

    #include <oxdraw.h>
    DrawAcf(const iArea, const vY, const sY, const cLag, ...);
    DrawAcf(const iArea, const vY, const sY, const cLag, const fAcf,
        const fPacf, const fErrorBand, int iIndex, const fBar);

  `iArea`
    in: int, area index
  `vY`
    in: k `x` T matrix, each row is a new plot
  `sY`
    in: string, variable name, or array of strings (k > 1)
  `cLag`
    in: int, highest lag to be used in the ACF
  `fAcf`
    in: int, `TRUE`: draw ACF (optional argument, drawn by default)
  `fPacf`
    in: int, `TRUE`: draw PACF (optional argument, not drawn by default)
  `fErrorBand`
    in: int, `TRUE`: draw error bands (optional argument, not drawn by default)
  `iIndex`
    in: int, line index, see default line attributes, (optional argument, default is 2).
  `fBar`
    in: int, `TRUE`: draw bar plot, else draw index plot (optional argument, using bars by default)

No return value.

Draws an ACF and/or PACF.

## DrawAdjust

    #include <oxdraw.h>
    DrawAdjust(const iType, ...);

  `iType`
    in: int, type of adjustment
  `d1` ... `d4`
    in: optional arguments

No return value.

The expected number of arguments depends on the type of adjustment (use -1 to keep the default value):

    constant         d1         d2         d3        d4        d5
    ADJ_AREAMATRIX   Y areas    X areas    box all
    ADJ_AREA_3D      area       azimuth    elevation distance  twist
    ADJ_AREA_P       area       x_1        y_1       width     height
    ADJ_AREA_X       area       x_1        x_2       grow
    ADJ_AREA_Y       area       y_1        y_2       grow
    ADJ_AREA_Z       area       z_1        z_2       grow
    ADJ_AXISCENTRE   0,1
    ADJ_AXISGRID     0,1        colour     type
    ADJ_AXISHIDE     0,1
    ADJ_AXISLABEL    rotation   font size  tick size
    ADJ_AXISLINE     zero line  above      no line   no small
    ADJ_AXISSCALE    type       scale      shift
    ADJ_COLOR        colour     type
    ADJ_INDEX        0,1,2      base
    ADJ_LEGEND       area       no columns font size resize    box
    ADJ_MINMAX       minimum    maximum
    ADJ_PAPERSCALE   percentage
    ADJ_SCALE        scale      shift
    ADJ_SYMBOL       type       size
    ADJ_SYMBOLUSE    style

The type for `ADJ_AXISSCALE` is one of:

        AXIS_LINEAR  standard axis,
        AXIS_LOG     log-scale (data is in natural logarithms),
        AXIS_LOG10   log10-scale (data is in base-10 logarithms),
        AXIS_SCALED  scaled: set scale and shift.

`ADJ_INDEX` with first argument equal to 1 draws an index line, use 2 for bars. The second argument sets the base for the index line or bars.

`ADJ_AREA_X`, `ADJ_AREA_Y`, `ADJ_AREA_Z` have an optional argument grow. Set this to one if the area should only grow if it already has dimensions fixed.

The azimuth is the rotation along the Z axis (or, more precisely orthogonal to the line of view). Elevation is the angle with the X-Y plane, and twist the rotation along the line of view. Azimuth, elevation and twist are specified in degrees, distance is in area units. The default values of azimuth, elevation, distance and twist could correspond approximately to: -125, 25, 1800, 0;

## DrawAxis, DrawAxisAuto

    #include <oxdraw.h>
    DrawAxis(const iArea, const iIsXaxis, const dAnchor,
        const dAxmin, const dAxmax, const dFirstLarge,
        const dLargeStep, const dSmallStep, const iFreq);
    DrawAxis(const iArea, const iIsXaxis, const dAnchor,
        const dAxmin, const dAxmax, const dFirstLarge,
        const dLargeStep, const dSmallStep, const iFreq,
        const dAnchor2);
    DrawAxisAuto(const iArea, const iIsXaxis, ...);
    DrawAxisAuto(const iArea, const iIsXaxis, const fShow,
        const iAnchor, const dAnchor, const dAnchor2);

  `iArea`
    in: int, area index
  `iIsXaxis`
    in: int, 1: X axis, 0: Y axis, 2: Z axis
  `dAnchor`
    in: int, if `iAnchor`=`ANCHOR_USER`: anchor of the axis (Y location of X, X location of Y and Z axis)
  `dAxmin`
    in: axis minimum
  `dAxmax`
    in: axis maximum
  `dFirstLarge`
    in: location of first large tick
  `dLargeStep`
    in: step size between large ticks
  `dSmallStep`
    in: step size between small ticks
  `iFreq`
    in: int, frequency (for time series X-axis, set to 0 otherwise)
  `fShow`
    in: int, `TRUE`: show the axis
  `iAnchor`
    in: int, axis anchor location, `ANCHOR_MIN`: at minimum, `ANCHOR_MAX`: at maximum, `ANCHOR_USER`: at `dAnchor`
  `dAnchor2`
    in: int, if `iAnchor`=`ANCHOR_USER`: anchor of the 3D axis (Z location of X and Y axis, Y location of Z)

No return value.

## DrawBoxPlot

    #include <oxdraw.h>
    DrawBoxPlot(const iArea, const vY, const sY);

  `iArea`
    in: int, area index
  `vY`
    in: k `x` T matrix, each row is a new plot (needs T>5)
  `sY`
    in: string, variable name, or array of strings (k > 1)

No return value.

## DrawCorrelogram

    #include <oxdraw.h>
    DrawCorrelogram(const iArea, const vY, const sY,
        const cLag);

  `iArea`
    in: int, area index
  `vY`
    in: k `x` T matrix, each row is a new plot
  `sY`
    in: string, variable name, or array of strings (k > 1)
  `cLag`
    in: int, highest lag to be used in correlogram

No return value.

Draws a correlogram (the ACF is computed slightly differently from `acf`). This function has been replaced by `DrawAcf`.

## DrawDensity

    #include <oxdraw.h>
    DrawDensity(const iArea, const vY, const sY, ...);
    DrawDensity(const iArea, const vY, const sY, const fDens,
        const fHist, const fNormal, BOOL fCdf, BOOL fStand, const cBar,
        const iIndex);

  `iArea`
    in: int, area index
  `vY`
    in: k `x` T matrix, each row is a new plot
  `sY`
    in: string, variable name, or array of strings (k > 1)
  `fDens`
    in: int, TRUE: draw estimated density (optional argument, default)
  `fHist`
    in: int, TRUE: draw histogram (optional argument, not drawn by default)
  `fNormal`
    in: int, TRUE: add the normal density with same mean and variance for reference (optional argument, not drawn by default)
  `fCdf`
    in: int, TRUE: plot the CDF in separate area (optional argument, not drawn by default); this is drawn as a QQ plot against the normal with same mean and variance (unless `fStand=TRUE`)
  `fStand`
    in: int, TRUE: use standardized data (optional argument, default uses original data)
  `cBar`
    in: int, number of bars (0: use default; optional argument)
  `iIndex`
    in: int, line index, see default line attributes, (optional argument, default is 2).

No return value.

Draws the histogram and/or density of the data in the specified area. When `fNormal` is `TRUE`, a normal density with the same mean and variance as the data will be drawn.

## DrawHistogram

    #include <oxdraw.h>
    DrawHistogram(const iArea, const vBar, ...);
    DrawHistogram(const iArea, const vBar, const dMin, const dStep,
        const iIndex, const iColorIn);

  `iArea`
    in: int, area index
  `vBar`
    in: k `x` T matrix with bar heights, each row is a new plot
  `dMin`
    in: double, first X-coordinate of histogram (optional argument, default is 1)
  `dStep`
    in: double, bar step size (optional argument, default is 1)
  `iIndex`
    in: int, line index, see default line attributes, (optional argument, default is 2).
  `iColorIn`
    in: int, colour index for inside of bars, see default line attributes, (optional argument, default is 0: white).

No return value.

Draws a histogram when the data is already in histogram format, i.e. `vBar` contains the bar heights.

## DrawLegend

    #include <oxdraw.h>
    DrawLegend(const iArea, const iOffsX, const iOffsY,
        const fHidden);

  `iArea`
    in: int, area index
  `iOffsX`
    in: int, X pixel offset from top left
  `iOffsY`
    in: int, Y pixel offset from top left
  `fHidden`
    in: int, `TRUE`: hide the legend

No return value.

`DrawLegend` determines the location of the legend. By default, a legend is drawn in the top left-hand corner, with a scale that adjusts automatically to the area size. `DrawLegend` can also be used to hide the legend. The content of the legend is determined by the variable names that are used when drawing vectors.

## DrawLine

    #include <oxdraw.h>
    DrawLine(const iArea, const dX1, const dY1, const dX2,
        const dY2, const iIndex);
    DrawLine(const iArea, const dX1, const dY1, const dZ1,
        const dX2, const dY2, const dZ2, const iIndex);

  `iArea`
    in: int, area index
  `dX1`, `dY1`
    in: int, real-world coordinates of starting point
  `dX2`, `dY2`
    in: int, Y real-world coordinates of end point
  `dZ1`, `dZ2`
    in: int, real-world Z coordinates for symbol in 3D graph
  `iIndex`
    in: int, line index for first row, see default line attributes, (optional argument, default is 2).

No return value.

## DrawMatrix

    #include <oxdraw.h>
    DrawMatrix(const iArea, const mYt, const asY,
        const dXfirst, const dXstep, ...);
    DrawMatrix(const iArea, const mYt, const asY,
        const dXfirst, const dXstep, iSymbol, iIndex);

  `iArea`
    in: int, area index
  `mYt`
    in: m `x` T matrix with m rows of data
  `asY`
    in: array of strings (holds variable names), or 0 (no names)
  `dXfirst`
    in: double, X-value of first observation, x
  `dXstep`
    in: double, gap between X-values, dx
  `iSymbol`
    in: int, 0: draw line, 1: draw symbols, 2: draw both (optional argument, default is 0).
  `iIndex`
    in: int, line index for first row, see default line attributes, (optional argument, default is 2). Each subsequent row will have the next index.

No return value.

This is a more flexible version of the `Draw()` function. `DrawMatrix` draws the m variables in the rows of `mYt`. The X variable consists of evenly spaced observations x, x+dx, x+2dx, x+3dx, .... The following table gives the default settings for each line index. Note that index 0 is the background colour, and 1 the foreground colour.

## DrawPLine, DrawPSymbol, DrawPText

    #include <oxdraw.h>
    DrawPLine(const iArea, const iX1, const iY1, const iX2,
        const iY2, const iIndex);
    DrawPSymbol(const iArea, const iX1, const iY1, const iX2,
        const iY2, const iSymType, const iIndex);
    DrawPText(const iArea, const sText, const iPx1,
        const iPy1, ...);
    DrawPText(const iArea, const sText,const iPx1,const iPy1,
        const iFontNo, const iFontSize, const fTitle);

No return value.
Pixel coordinate versions of DrawLine, DrawSymbol DrawText.

## DrawQQ

    #include <oxdraw.h>
    DrawQQ(const iArea, const vY, const sY, const iDens,
        const df1, const df2);

  `iArea`
    in: int, area index
  `vY`
    in: k `x` T matrix, each row is a new plot
  `sY`
    in: string, variable name, or array of strings (k > 1)
  `iDens`
    in: int, one of: `QQ_CHI`, `QQ_F`, `QQ_N`, `QQ_T`, `QQ_U`
  `df1`
    in: int, first parameter for distribution
  `df2`
    in: int, second parameter for distribution

No return value.

Draws a QQ plot. The following distributions are supported:

- `QQ_CHI` : chi ^2(df1),
- `QQ_F` : F(df1, df2),
- `QQ_N` : N(0, 1),
- `QQ_T` : t(df1),
- `QQ_U` : Uniform(0,1), resulting in a Quantile plot.

## DrawSpectrum

    #include <oxdraw.h>
    DrawSpectrum(const iArea, const vY, const sY,
        const iOrder);

  `iArea`
    in: int, area index
  `vY`
    in: k `x` T matrix, each row is a new plot
  `sY`
    in: string, variable name, or array of strings (k > 1)
  `iOrder`
    in: int, lag truncation parameter m

No return value.

Draws the estimated spectral density.

## DrawSymbol

    #include <oxdraw.h>
    DrawSymbol(const iArea, const dX1, const dY1, const dX2,
        const dY2, const iSymType, const iIndex);
    DrawSymbol(const iArea, const dX1, const dY1, const dZ1, const dX2,
        const dY2, const dZ2, const iSymType, const iIndex);

  `iArea`
    in: int, area index
  `dX1`, `dY1`
    in: int, real-world coordinates, lower-left corner of bounding box
  `dX2`, `dY2`
    in: int, real-world coordinates, upper-right corner of bounding box
  `dZ1`, `dZ2`
    in: int, real-world Z coordinates for symbol in 3D graph
  `iSymType`
    in: int, symbol type
  `iIndex`
    in: int, line index for first row, see default line attributes, (optional argument, default is 2). Each subsequent row will have the next index.

No return value.

## DrawT

    #include <oxdraw.h>
    DrawT(const iArea, const mYt, const mnYear,
        const mnPeriod, const iFreq);

  `iArea`
    in: int, area index
  `mYt`
    in: m `x` T matrix with m y variables
  `mnYear`
    in: int, year of first observation
  `mnPeriod`
    in: int, period of first observation
  `iFreq`
    in: int, frequency of observations

No return value.

Draws m variables in the specified area against time. Each variable is drawn by linking up the points. The first line index is 2.

## DrawText, DrawTitle

    #include <oxdraw.h>
    DrawText(const iArea, const sText, const dX1,
        const dY1, ...);
    DrawText(const iArea, const sText, const dX1, const dY1,
        const iFontNo, const iFontSize, const iTitle, const iRotation,
        const dZ1);
    DrawTitle(const iArea, const sText);

  `iArea`
    in: int, area index
  `sText`
    in: string, the text may include LaTeX-style formatting
  `dX1`, `dY1`
    in: int, real-world coordinates, anchor of text
  `iFontNo`
    in: int, font number (0 for first font; use -1 for the default font)
  `iFontSize`
    in: int, font size (e.g. 330; use -1 for the default size)
  `iTitle`
    in: int, `0`: is normal text, else is graph title (coordinates are ignored):
    `TEXT_TITLE` - graph title
    `TEXT_XLABEL` - label along X-axis
    `TEXT_YLABEL` - label along Y-axis
    `TEXT_ZLABEL` - label along Z-axis
  `iRotation`
    in: int, rotation (in degrees, default is 0)
  `dZ1`
    in: int, real-world Z coordinate of text anchor (for text in 3D graphs; default is 0)

No return value.

Note that the forward slash for LaTeX commands must be doubled, for example:

        DrawText(0, "$\\leftarrow\\arrowext$", 1962, 1, -1, -1, 0, 45);

`DrawTitle` draws text at the title location. This corresponds to `DrawText(iArea, sText, 0, 0, -1, -1, TEXT_TITLE)`.

Text can also be rotated, by specifying the angle in degrees. This will not work well for multiple line text blocks, and currently does not work for maths on screen in GiveWin when the text size is between 280 and 320.

## DrawTMatrix

    #include <oxdraw.h>
    DrawTMatrix(const iArea, const mYt, const asY,
        const mnYear, const mnPeriod, const iFreq, ...);
    DrawTMatrix(const iArea, const mYt, const asY,
        const mnYear, const mnPeriod, const iFreq, iSymbol,
        iIndex);

  `iArea`
    in: int, area index
  `mYt`
    in: m `x` T matrix with m y variables
  `asY`
    in: array of strings (holds variable names), or 0 (no names)
  `mnYear`
    in: int, year of first observation
  `mnPeriod`
    in: int, period of first observation
  `iFreq`
    in: int, frequency of observations
  `iSymbol`
    in: int, 0: draw line, 1: draw symbols, 2: draw both (optional argument, default is 0).
  `iIndex`
    in: int, line index for first row, see Default line attributes, (optional argument, default is 2). Each subsequent row will have the next index.

No return value.

This is a more flexible version of the `DrawT()` function. Draws m variables in the specified area against time. See under `DrawMatrix` for the default settings for each line index.

## DrawX

    #include <oxdraw.h>
    DrawX(const iArea, const mYt, const vX);

  `iArea`
    in: int, area index
  `mYt`
    in: m `x` T matrix with m y variables
  `vX`
    in: 1 `x` T matrix with x variable

No return value.

Draws m y variables in the specified area against an x variable. Each point is marked, but the points are not linked, resulting in a cross plot. The first line index is 2.

## DrawXMatrix

    #include <oxdraw.h>
    DrawXMatrix(const iArea, const mYt, const asY, const vX,
        const sX, ...);
    DrawXMatrix(const iArea, const mYt, const asY, const vX,
        const sX, iSymbol, iIndex);

  `iArea`
    in: int, area index
  `vX`
    in: 1 `x` T matrix with x variable
  `iSymbol`
    in: int, 0: draw line, 1: draw symbols, 2: draw both (optional argument, default is 0).
  `iIndex`
    in: int, line index for first row, see Default line attributes, (optional argument, default is 2). Each subsequent row will have the next index.

No return value.

This is a more flexible version of the `DrawX()` function. Draws m variables in the specified area against an x variable See under `DrawMatrix` for the default settings for each line index.

## DrawXYZ

    #include <oxdraw.h>
    DrawXYZ(const iArea, const vX, const vY, const mZ, ...);
    DrawXYZ(const iArea, const vX, const vY, const mZ,
        const iMode, const sX, const sY, const sZ,
        const iPalette, const iIndex);

  `iArea`
    in: int, area index
  `vX`
    in: 1 `x` k matrix with X variable
  `vY`
    in: 1 `x` n matrix with Y variable
  `mZ`
    in: n `x` k matrix with Z variable, heights above XY plane (tabular format)
    or
    in: 1 `x` n=k matrix with Z coordinates for points (X, Y, Z), rough approximation of surface is constructed (scatter format)
  `iMode`
    in: int, type of plot (optional argument):
    `-1` - triangulation (only for scatter format)
    `0` - surface plot only (default)
    `1` - currently unsupported: surface plot with contours on ground level
    `2` - 2-dimensional contour plot
  `sX`
    in: string, name of X variable (optional argument)
  `sY`
    in: string, name of Y variable (optional argument)
  `sZ`
    in: string, name of Z variable (optional argument)
  `iPalette`
    in: int, palette index, see Default line attributes, (optional argument, default is 2: red).
  `iIndex`
    in: int, line index for mesh, see Default line attributes, (optional argument, default is 1: black).

No return value.

## DrawZ

    #include <oxdraw.h>
    DrawZ(const vZ, ...);
    DrawZ(const vZ, const sZ, const iMode, const dFac,
        const iIndex);

  `iArea`
    in: int, area index
  `vZ`
    in: 1 `x` T matrix with Z variable
  `sZ`
    in: string, 1 name of Z variable
  `iMode`
    in: int, type of Z variable (optional argument):
    `ZMODE_SYMBOL` - use values as symbol size,
    `ZMODE_VALUE` - draw value as text,
    `ZMODE_BAR` - draw error bars (the default),
    `ZMODE_BAND` - draw error bands,
    `ZMODE_FAN` - draw error fans,
    `ZMODE_HILO` - draw high-low plot,
    `ZMODE_3D` - draw 3-D points.
  `dFac`
    in: double, bar/band factor (optional argument, 2.0 is default)
  `iIndex`
    in: int, line index for first row, see Default line attributes, (optional argument, default is 2). Each subsequent row will have the next index.

No return value.

`DrawZ` adds a Z component to the most recent graphics object. `DrawZ` should be used immediately after a call to one of the draw functions `Draw`, `DrawMatrix`, `DrawX`, etc.).

## SetDraw

    #include <oxdraw.h>
    SetDraw(const iOption, ...);

  `iType`
    in: int, type of adjustment
  `i1` ... `i5`
    in: optional arguments

No return value.

The expected number of arguments depends on the type of adjustment:

    option             i1             i2             i3            i4           i5

    SET_AXIS           fontsize       step           tick
    SET_AXISFORMAT     width:8        precision:6    same prec:0,1 lead zero:0,1
    SET_AXISLINE       no X-line      no Y-line      center dates  no small Y
    SET_BOX            box:0--1       X-grid:0--1    Y-grid:0--1
    SET_BWG            lineno:0--15   red:0--255     green:0--255  blue:0--255
    SET_COLOR          lineno:0--15   red:0--255     green:0--255  blue:0--255
    SET_COLORMODEL     model:0--3
    SET_FONT           fontno:0--3    fontsize
    SET_GRID           color:0--15    type:0--15
    SET_HISTOGRAM      inside:0--15   outside:0--15
    SET_LEGEND         boxed:0--1     columns
    SET_LEGENDFONTSIZE fontsize
    SET_LEGENDHIDE     hide:0--1
    SET_LEGENDRESIZE   resize:0,1
    SET_LINE           lineno:0--15   linetype:0--4  width         on           off
    SET_LINEBWG        lineno:0--15   linetype:0--4  width         on           off
    SET_MARGIN         left-margin    top-margin
    SET_PALETTE_MAX    lineno:0--7    red:0--255     green:0--255  blue:0--255
    SET_PALETTE_MIN    lineno:0--7    red:0--255     green:0--255  blue:0--255
    SET_PAPERCOLOR     red:0--255     green:0--255   blue:0--255
    SET_PRINTPAGE      papertype:0--2 orient:0--1    X-size        Y-size
    SET_SYMBOL         lineno:0--15   symtype:0--4   size
    SET_XYSTYLE        2D-style:0,1   3D-style:0,1

Paper, orientation and model arguments for `SET_PRINTPAGE` and `SET_COLORMODEL` are:

    papertype    orientation        model
    PAGE_A4      PAGE_PORTRAIT      0   black & white
    PAGE_LETTER  PAGE_LANDSCAPE     1   black, white, gray
    PAGE_USER                       2   gray

## SaveDrawWindow

    #include <oxdraw.h>
    SaveDrawWindow(const sFilename);

  `sFilename`
    in: valid file name

No return value.

Saves the current graph to the specified file. The file format for saving is derived from the extension. The following formats are supported:

- `.eps` : Encapsulated PostScript
- `.gwg` : GiveWin graphics file
- `.ps` : PostScript

See the GiveWin book for a description of these formats.

## SetDrawWindow

    #include <oxdraw.h>
    SetDrawWindow(const sTitle);

  `sTitle`
    in: string, name of window

No return value.

This function is only relevant when interacting with GiveWin otherwise it does nothing. It sets the name of the GiveWin window in which the graphs of the Ox program appear to `sTitle`.

## SetTextWindow

    #include <oxdraw.h>
    SetTextWindow(const sTitle);

  `sTitle`
    in: string, name of window

No return value.

This function is only relevant when interacting with GiveWin otherwise it does nothing. It sets the name of the GiveWin window in which the output (from the `print()` function) of the Ox program appears to `sTitle`.

## ShowDrawWindow

    #include <oxdraw.h>
    ShowDrawWindow();

No return value.

Shows the drawing. Note that in some implementations the graphs cannot be displayed. Then a message is printed (`SaveDrawWindow()` will still work in that case!). A call to `ShowDrawWindow` also clears the drawing buffer, so does not need to be followed by a call to `CloseDrawWindow`. Therefore, two subsequent calls to `ShowDrawWindow` first show, then clear the graph from the active window.

Ox version 3.40. © JA Doornik This file last changed
.