Plot Command

The Plot command requires two columns, X and Y.

These can be number columns, date columns, or text columns that have been mapped to a number.

Line Style

By default, the command draws a solid line, that has the some color and width as the pen in the Style settings. You can modify the line style, color and width. Choose from the nine built-in line styles.

At the bottom of the Line style menu, there is a section labeled ‘From Style’. These are styles that you can customize in the Style settings.

Point Style

You can add points at the x-y coordinates. There are over 20 different points styles to choose from. When you add open points, the point color and size are set to the point variable the Style settings.

For solid points, the point and line color are the same.

You can also choose open points where you can vary the fill color. The point outline will always match the line color.

You can also select a no fill option, such that overlapping points, other graphs elements, or background colors set in the Canvas settings, can show through.

Connect

The connect setting allows you to draw multiple disconnected lines, even when your data points are the same columns. For example, here are two columns of data, where the x values are repeated.

With the default settings, the lines would connect every point.

By changing Connect to ‘If x increases’, these are drawn as two lines.

Bridge Gaps

When data is blank or missing from a row, this results in a break in the connection.

Check Bridge gaps in data to draw the line between the break.

Line Type

The Line type can be Straight, Smooth, or Steps.

If you chose Steps, you can also vary the orientation of the step, relative to the point.

Fill

By default, the Fill menu is set to ‘Nothing’. It can be changed to Solid, Pattern, Gradient, or Noise.

For example, here the fill is a solid color and fills the area below the line to the X axis. Options for customizing the fill are displayed to the right of the fill menu and change depending on the selection.

Fill Style

The fill style can be used to change the direction of fill or you can select a column of data. For example, here is data for x and y along with another y2 column.

The Fill style is modified so the fill goes between the lines for y and y2. Here the Fill type is ‘Noise’.

Mask

Below the fill is the mask option. This allows you to mask out parts of the rows. This is a gap that is treated just like a blank row; thus, if Bridge gaps in data is not checked you might get a very spotty line between the points.

For example, here you have data where the results are in one table but we want to plot Trial A separately from Trial B.

Plotting all the data will result in both A and B shown.

Add a Mask to show the points only when the column ‘Trial’ matches ‘A’.

The masked rows (i.e., in this case where Trial matches ‘B’) are treated as though they are blank, resulting in gaps in the connected line.

If you check Bridge gaps in data, the points will be connected.

To Plot both A and B in the same graph, use a separate command for each, where each one has a mask and is set to ‘Bridge gaps in data’.

Labels

Below the mask is the label option. This allows you to label each point on the graph.  

The default Label offset is ‘point’, which is a variable defined in the style settings. The Label offset can either be a single value or a coordinate (x,y). If the offset is a single value, DataGraph tries to figure out how to offset the number so that it won’t overlap the line. If you specify two values, this offset is used at each point in the x and y direction.

Plot Offset

Shift the x,y coordinates. Set to 0,0 by default.

Crop x values

Crop the data without effecting the axes range. Set to -∞,∞ by default.

Legend name

Add a Legend command to show the plot as a legend entry. The default legend name is set to the name of the y column using a token.

You can overwrite the legend name with text or a different token. You can also change the legend location from ‘In legend’ to ‘At the end’

NOTE: When the legend location is ‘At the end’ the Label offset is used to set the exact location. Thus, modify the label offset to adjust the location.

Error bars

At the bottom is the error bar selector. By default, it is set to ‘No Error’, but there are several entries in that menu.

For a detailed description see: How to add Error Bars.

Related Articles