From emergent
Jump to: navigation, search
Reference info for type GraphTableView: Wiki | Emergent Help Browser
Reference info for type GraphAxisBase: Wiki | Emergent Help Browser
Reference info for type GraphPlotView: Wiki | Emergent Help Browser


The Graph View represents information in a DataTable in a graphical form, in 2 or more dimensions. There are many different ways of configuring the display, with a relatively compact set of options all represented in the graph view control panel.

Standard Line/Point Graph of Scalar Data

The default configuration is for a basic line graph, plotting up to 5 different scalar data column variables as a function of an X axis and, optionally, a Z axis.

The bulk of the control panel consists of selectors for choosing what data columns from the data table to use for each of these values. Look at the label at the very left of the control panel:

  • X = horizontal axis (can choose a column or the row number from the data table) -- if selecting a string data type, then row_num will automatically be selected. The range to plot can also be selected.
  • Z = depth axis (into the plane of the display) -- this is optional but provides for full 3D graphing. It has the same options as the X axis.
  • Y1..Y5 = the different Y axis values. Each of these can be turned on to display, to allow for easy toggling on and off. Also, the range of values to display can be fixed at either/or the min/max -- the default is auto scaling to fit the full range. All of these Y axis values share either the main Y axis, or the alternate Y axis (Alt Y).

Important note: the first Y1 value is "special" in that it controls the actual Y axis label and display, so it cannot be turned off. Also, the Y2 value has a similar special role in determining the alternate Y axis: if you want an alternate Y axis, you must set it in the Y2 axis (and subsequent Y values can choose to also use that alt Y axis, but they cannot create it if it wasn't selected in Y2).

Plot Styles

Several of the parameters at the very top of the control panel determine how the lines are plotted:

  • Style: Lines, points or both
  • Line Width: how thick are the lines?
  • Neg Draw: if the X axis value between two points goes in a negative direction, should a line be drawn or not? In many cases, the data table will contain multiple "runs" of a given simulation stacked end to end. Between the end of one run and the start of the next, you don't typically want to draw a line -- that is what having neg draw off does for you. However, if you are plotting more fully X-Y data where the X values can go positive or negative, you probably want to turn this on.


The Color Mode setting at the bottom determines how lines are colored:

  • VALUE_COLOR -- the default -- the color is determined by the Y axis value, according to the color scale shown next to this setting. This is redundant with the vertical plot value, but this makes the information all the more apparent and plus it looks cool.
  • FIXED_COLOR -- if you have multiple different Y axis values plotted, you probably want to select this -- each line is plotted in a fixed color associated with the axis. To change this color, you have to click on the line in the 3d view, and choose "View Properties" from the context menu (right mouse button or ctrl+mouse on Mac) and change the color setting in the dialog that comes up.
  • COLOR_AXIS -- the color is determined by another column of the datatable, as specified in the color_axis setting. This allows a single line to express two different data values, and can be useful for assessing the correlation between those values.

Error Bars

If your datatable contains data columns that have error values relative to the Y axis values being plotted (e.g., standard deviation or standard error of the mean), then you can select them in the Err fields, one for each of the 5 Y axis values. These can also be used to plot another related data field other than error, although that is not conventional.

Bar Graphs

Bar graphs are pretty much the same as line plots, but each data point is drawn with a vertical bar from the zero point up and back. Select this by changing the Graph field from XY to BAR. Note that you probably want to select fixed min/max X axis values that go beyond the actual range, so the bars fit nicely.

Raster Plots

Raster plots use separate data column for the vertical axis, so that the lines become stacked upon each other. They are commonly used to display neural spiking data over multiple samples or traces (which then is the raster axis). Without an actual vertical plot point, the actual value must be conveyed either through color (using VALUE_COLOR), or through a binary thresholding process (ideal for spike rasters). The Style settings of THRESH_LINE or THRESH_POINTS accomplish this, and the threshold to apply is next to the color axis near the bottom of the control panel.

Matrix Data

To make a graph of a data table column that has a matrix of values per each cell, you can only plot one such variable at a time. Simply select that variable as the sole Y1 axis value, and the display is then carved into a matrix of graphs reflecting the matrix geometry of each cell of data. Each mini-graph then has a plot of the associated matrix cell's value across rows for the selected X and Z axes.

It is also possible to plot a single row of matrix data at a time, using that one cell of matrix data as the X,Y, and possibly Z values for the plot. NOTE: this feature is not yet implemented.

Configuring From A Program

To configure a graph using Program code, you can directly access the plot_n (where n is the plot number) members of the GraphTableView object to configure what is plotted:

.EpochOutputData.FindGraphView().plot_1.col_name = "avg_sse";
.EpochOutputData.FindGraphView().plot_1.on = true;

For doing many operations, it is convenient to create a GraphTableView Object* ProgVar, set it to the FindGraphView() result, and then operate on it directly.