plot widget
Manual
The following sections describe the common interactive plotting widget used throughout ATSAS graphical applications, its elements, and data export functionality.
This manual applies to all ATSAS GUIs using the standard plot widget.
Introduction
The ATSAS plot widget is used to visualize one or more data sets as two-dimensional data series. It supports interactive inspection, visual comparison, and export of plotted data.
The plot widget does not modify the underlying data and does not perform fitting or analysis by itself.
Plot Elements
Axes
Each plot has horizontal and vertical axes with labels and units. Axes may be displayed on linear, logarithmic, or other scales, depending on the application.
Axis ranges are generally automatically selected based on the data on display, but can be set manually as needed.
Axis scaling affects only visualization; changing axis settings does not alter the underlying data.
- To change labels, scaling, or ranges, right-click on the plot and select Configure -> Axes.
Series
Data series are collections of visible or hidden data points in the plot area. They can be represented as symbols, with or without error bars, and the data points may be connected by lines. Each data series has a configurable label that can be shown in the Legend to identify the series. The default label is the file name from which the data were read.
Unlike Annotations, data series cannot be added to the plot arbitrarily; they are added and removed by the controlling application.
- To configure the presentation of a data series, right-click on the plot and select Configure -> Series.
Annotations
Annotations are visible or invisible markers in the plot area. They can be text annotations, horizontal or vertical lines, symbols, or any combination of these.
Annotations are part of the plot and have a location in data coordinates. They move with the data when zooming, moving, or scaling the Axes. Annotations are included in axis range calculation and may be used to keep specific values shown, e.g. \(s = 0.0\). One or more lines may be used to highlight or separate regions, and text can label features.
- To add an annotation, right-click on the plot and select “Insert Annotation”
- To modify or remove an annotation
- double-click its label if visible
- or right-click on the plot and select Configure -> Annotations
- To adjust the position of an annotation on the plot
- press Ctrl (Windows, Linux) or Cmd (macOS) and drag the annotation label on the plot
- or enter the coordinates directly in Configure -> Annotations
Graphics
Graphics are user-defined images displayed in the plot area intended for visual context, for example depictions of crystallographic structures illustrating the protein under study.
Graphics are part of the plot and have a location in data coordinates. They move with the data when zooming, moving, or scaling the Axes. Graphics are included in the calculation of the axes ranges.
- To add a graphic, right-click on the plot and select “Insert Graphic”, then select an image from the file system
- To change the graphic, adjust its position, or remove a graphic
- double-click the graphic
- or right-click on the plot and select Configure -> Graphics
Legend
The legend identifies the data Series shown in the plot and their associated colors or symbols. Legend entries correspond one-to-one with plotted data sets.
In plots with multiple Series, the legend provides the primary means of identifying individual data sets.
Legends are disabled by default.
- To enable or change the position of the legend, right-click on the plot and select Configure -> Legend.
Global defaults
Plots use default values such as line thickness, colors, or legend visibility. These can be changed by right-clicking the plot and selecting “Configure Plot Defaults”.
Note that these are global defaults that apply to all plots.
Plot Interaction
Zooming
Zooming lets you focus on specific regions of a plot without losing the overall context. You can zoom in to magnify a local feature, then step back out to broader scales, making it easy to inspect fine details and compare trends across ranges.
- To switch to zoom mode, right-click on the plot and select “Zoom” (the default).
- To zoom in, click and drag a rectangle with the mouse. On release the plot widget shows only the selected rectangle. Zoom levels can be stacked.
- To move one zoom level up, right-click on the plot and select “Zoom out”.
- To zoom out all the way, right-click on the plot and select “Zoom to data range”.
- To zoom to a previously user-defined range, right-click on the plot and select “Zoom to user defined range”. This option is disabled if no user-defined range exists.
- If “Auto zoom on change” is enabled, the plot re-zooms after adding or editing data to update the plot range; disable this option to stay zoomed to a given range after changes.
Moving/Panning
Moving/panning shifts the visible window across the plot without changing the current zoom level. It’s useful for scanning along an axis or comparing adjacent regions once you’ve zoomed in. Panning keeps scales and selections intact, so you can explore neighboring areas while preserving the detail level you’ve already chosen.
- To switch to move mode, right-click on the plot and select “Move”.
- To move, left-click in the plot area and drag to a new position.
Data Selection
Some activities allow selecting data ranges directly in the plot widget. In such cases, right-click on the plot and select “Select Range”. Then select the data range of interest by clicking and dragging a rectangle with the mouse.
Show Position
It is possible to show the current position of the cursor in plot coordinates. To do so, right-click on the plot and enable/disable “Show Position”.
The cursor now displays:
- current plot coordinates (transformed, e.g. \(log_{10}\) of intensities)
- the corresponding reciprocal-space coordinates (original data)
- the corresponding real-space value: \(2\pi / s\)
Plot Export
Export As Figure
Plots can be exported as image or vector graphics files. Exported figures reflect the current view state, including:
- axis ranges and scaling
- visible Series
- annotations and graphics
- legend
When exporting, specify a filename. The extension (.png, .tiff, .jpg, .bmp, .svg, .pdf) given defines the image and file type. Also specify a size in pixels/dots, mm, cm or inch, and a resolution (dots per inch, dpi) must be specified.
Exporting a plot does not modify the data. Exported figures cannot be reloaded into ATSAS applications.
To export any plot as figure, right-click on the plot and select “Export As Figure”.
Export As Data
Plots can export the underlying data in comma-separated value (CSV) format for use elsewhere. This data does include the legend labels in the column headers, but does not include any other labels, annotations or graphics.
Columns are:
- a stacked and sorted s-vector of all data series, duplicates removed
- for each data series, two columns: data and associated errors
- if there is no data at any given s, “nan” is put in place of a number
To export any plot as data, right-click on the plot and select “Export to CSV”.