Preamble 
''
'' AUTHOR: Steve Bailey
'' CREATED: 2-26-96
'' DESCRIPTION:
''     Program showing new capability of Simgraphics II for setting attributes
''     of graphs at runtime.  A window containing a trace plot of three 
''     variables is displayed along with a dialog box allowing interactive
''     modification of this chart's parameters.
''
  define CHART.PTR as a pointer variable
  define CHART.DLG as a pointer variable
  define CHART.CTRL, FIELD.CTRL, DATASET.CTRL, OPTION.CTRL as a routine

    '' the values of these variables are shown inside the chart
    '' each variable corresponds to one of the data sets
  define Y1, Y2, Y3 as double variables

    '' to plot data to the chart, simply assign one of the Y varibles
    '' to the desired value.  The X value is assigned through "TIME.V"
  display variables include Y1, Y2, Y3

'' ********** ID values passed to SET.CHART.OPTION.R **********
  define .CHART.SHOW.LEGEND       to mean 1   '' display legend on bottom?
  define .CHART.SHOW.BOX          to mean 2   '' show ref. axes on edges?
  define .CHART.TIME.TRACE        to mean 3   '' TRUE for any trace plot
  define .CHART.STACKED           to mean 4   '' stack data cells?
  define .CHART.ADJACENT          to mean 5   '' show data cells side by side?
  define .CHART.X.TICS.INSIDE     to mean 6   '' tic placement wrt x axis
  define .CHART.Y.TICS.INSIDE     to mean 7   '' tic placement wrt y axis
  define .CHART.X.TICS.OUTSIDE    to mean 8   '' tic placement wrt y axis
  define .CHART.Y.TICS.OUTSIDE    to mean 9   '' tic placement wrt y axis
  define .CHART.SHOW.X.GRID       to mean 10  '' show grid line for x axis
  define .CHART.SHOW.Y.GRID       to mean 11  '' show grid lines for y axis
  define .CHART.SHOW.Y2.GRID      to mean 12  '' show grid lines for y2 axis
  define .CHART.RESCALE.X         to mean 13  '' rescale x axis if neccessary 
  define .CHART.RESCALE.Y         to mean 14  '' rescale y axis if neccessary 
  define .CHART.RESCALE.Y2        to mean 15  '' rescale y2 axis if neccessary 
  define .CHART.COMPRESS          to mean 16  '' for trace plots. show all data?

'' ********** ID values to be passed to SET.CHART.FIELD.R **********
  define .CHART.X.MIN             to mean 1
  define .CHART.Y.MIN             to mean 2
  define .CHART.Y2.MIN            to mean 3
     '' minimum values on axes

  define .CHART.X.MAX             to mean 4
  define .CHART.Y.MAX             to mean 5
  define .CHART.Y2.MAX            to mean 6
     '' maximum values on axes

  define .CHART.X.INTERVAL        to mean 7  
  define .CHART.Y.INTERVAL        to mean 8
  define .CHART.Y2.INTERVAL       to mean 9
     '' tic mark intervals.  X interval defines cell width if DSINTERVAL = 0

  define .CHART.X.MINOR.INTERVAL  to mean 10
  define .CHART.Y.MINOR.INTERVAL  to mean 11
  define .CHART.Y2.MINOR.INTERVAL to mean 12
     '' smaller intervals for small tic marks

  define .CHART.X.NUM.INTERVAL    to mean 13
  define .CHART.Y.NUM.INTERVAL    to mean 14
  define .CHART.Y2.NUM.INTERVAL   to mean 15
     '' numbering intervals

  define .CHART.X.GRID.INTERVAL   to mean 16
  define .CHART.Y.GRID.INTERVAL   to mean 17
  define .CHART.Y2.GRID.INTERVAL  to mean 18
     '' grid line intervals

  define .CHART.X.INTERCEPT       to mean 19   '' point is on x axis
  define .CHART.Y.INTERCEPT       to mean 20   '' point is on y axis
  define .CHART.X2.INTERCEPT      to mean 21   '' point is also on x axis
     '' intersection points 

  define .CHART.X.SCALE           to mean 22
  define .CHART.Y.SCALE           to mean 23
  define .CHART.Y2.SCALE          to mean 24
     '' data scaling factors

'' ********** ID values for SET.CHART.DSOPTION.R routine **********
  define .CHART.DS.DISCRETE       to mean 1
    '' for histograms, bar charts, and discrete surface type charts

  define .CHART.DS.STATIC         to mean 2
    '' for non-simulation presentation charts

  define .CHART.DS.SURFACE        to mean 3 '' for surface charts
    '' for surface charts

  define .CHART.DS.CENTERED       to mean 4 
    '' for histograms and surface charts

  define .CHART.DS.NARROW         to mean 5 '' for bar charts
    '' for bar charts only

  define .CHART.DS.USEY2AXIS      to mean 6 
    '' if true, data will be scaled according to the right (y2) axis

  define .CHART.DS.INTERPOLATE    to mean 7
    '' If false, surface will be drawn in only horizontal and vertical lines

  define .CHART.DS.FILL           to mean 8
    '' If true, data cell will be drawn with polygons

  define .CHART.DS.LINE           to mean 9
    '' If true, data values will be connected with a line segment

  define .CHART.DS.MARK           to mean 10
    '' If true, polymarkers will be used to show a data value


'' ********** Part Id values for SET.GRAPH.PARTSTYLE.R **********
  define .CHART.TITLE             to mean 1
  define .CHART.X.TITLE           to mean 2
  define .CHART.Y.TITLE           to mean 3
  define .CHART.Y2.TITLE          to mean 4
  define .CHART.X.AXIS            to mean 5
  define .CHART.Y.AXIS            to mean 6
  define .CHART.Y2.AXIS           to mean 7
  define .CHART.X.NUMBERING       to mean 8
  define .CHART.Y.NUMBERING       to mean 9
  define .CHART.Y2.NUMBERING      to mean 10
  define .CHART.X.GRID            to mean 11
  define .CHART.Y.GRID            to mean 12
  define .CHART.Y2.GRID           to mean 13
  define .CHART.BORDER            to mean 14
  define .CHART.LEGEND            to mean 15
  define .CHART.DATASET           to mean 16
end  '' preamble
