-
Notifications
You must be signed in to change notification settings - Fork 35
Line Plot Display
The line plot displays zero or more data items.
The line plot should provide a legend.
The line plot should allow the user to choose styles such as color and transparency, whether the plot is filled or not, and whether the plot is drawn using point-to-point drawing or bars.
The user should be able to choose to have integer scaling in the x-axis.
The user should be able to rearrange the ordering of input data items.
The user should be able to add and remove data items from the list.
The user should be able to shift/expand/contract/reset the axes using the mouse/keyboard.
The user should be able to shift/expand/contract/delete/add intervals using the mouse/keyboard.
The user should be able to shift/delete/add channels using the mouse/keyboard.
The user should be able to delete/add markers using the mouse/keyboard.
The input data items may be 1-d or 2-d. If data items are 2-d, then each row is displayed separately.
The maximum number of plots on a single graph is fixed (16).
Data may be discrete or continuous.
Continuous data is sampled at the plot resolution.
Discrete data is resampled into bins such that the number of bins matches the plot resolution.
A line plot has three possible coordinate systems: a calibrated coordinate system, an uncalibrated (pixel) coordinate system, and a fractional coordinate system.
The calibrated coordinate system is derived from the uncalibrated coordinate system by applying the dimensional calibrations.
The fractional coordinate system is derived from the uncalibrated coordinate system by dividing by the dimensional scale.
For a line plot associated with a single data item, the uncalibrated coordinate system is dynamically determined from the source data and dimensional calibrations. The dimensional scale (for fractional coordinates) is the length of the data.
For a line plot associated with a composite data item, the uncalibrated coordinate system is determined from the dimensional scale and dimensional calibration stored in the display. If the dimensional scale or dimensional calibration are not specified, no graphs are drawn.
Intervals, channels, and other graphic items referring to the x-axis are defined in fractional coordinates of the x coordinate system.
Data layers with units different from the coordinate system are not displayed.
The line plot y-axis may be fixed or automatically determined by the data and calibration of constituent data.
(Future) The line plot should allow a reduced y-axis for part of the plot, allowing additional detail past a particular x-value.
The overall layout is dependent on the width of the line plot y-axis, which may be dependent on the data if the y-axis is autoscaled.
Furthermore, the line plot x-axis may be dependent on layout if line plot is displayed with integer-multiple scaling along the x-axis.
A rough algorithm for layout:
axes_y = AxesYFunction(data)
layout = LayoutFunction(axes_y)
axes = AxesXYFunction(axes_y, layout, data)
plot = PlotFunction(layout, data, axes)
painting = PaintFunction(layout, plot)
The y-axis should have overshoot and hysteresis to avoid jumping around during live acquisition.
Rendering draws data in order of index and then graphics in order of index. In both case, higher index is on top.
The line plot should draw in layers so that updating one layer does not force the others to draw. However, making an axis auto scale to the data may force rendering for all layers if scaling changes.
The line plot should support interval graphics, single channel graphics, and data markers (e.g. a peak position).
The graphics track their locations in fractional coordinates of the x coordinate system.
There is no provision for integer pixel coordinates at this time.