Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

1D Plotting

This window lets you graph collected data in a variety of ways. The 1D refers to the number of dimensions in the domain (x-axis) of your plot. You'll generally be plotting your data (neutron counts) against a changing variable such as a motor's position on the x-axis.

Basic Controls

Pan: Shift-Left Click and Drag

Zoom: Mouse Wheel

Zoom Box: Left Click and Drag

Restore View: Left Double-Click

Point Information: Hover mouse over point

Context Menu: Right click on axis, data point, or arbitrary point on graph

Plotting Basics

As you run trajectories/findpeaks data will be emitted from the NICE server as a "data stream". Each data stream is composed of one or more scans and each scan can plotted in any NICE client. A single data stream can be composed by one or more scans. For example, when running a polarized beam trajectory you may have one scan per polarization cross section. To learn about how scans are defined in a trajectory see: Trajectories.

By default, each time a new data stream is created the current plot will clear and start plotting its streams. Each scan will be displayed using a unique style such as a color/shape combination. The streams/scans, which are available for plotting appear in a tree on the right side of the window. The current plotted scans will be selected and shown with a key corresponding to their style in the plot. You are free to change the selection any time, to plot any combination of scans you like, from different streams, or even different experiments!

  • To plot a single scan, by itself - left click
  • To add/remove a scan to/from the current plot - CTRL-left click

Note: if you are currently collecting data NICE will automatically update which scans are being plotted, interfering with any custom plot you are trying to setup, unless you change its Auto Select settings. This is described in the next section.

Auto Select (Scans)

To change how NICE automates plotting choose one of the four options in the bottom right corner of the window:

  • All - Every new scan, will automatically be added selected set.
  • Stream - Every time a new stream starts the set of scans being plotted is cleared. Each new scan, which is part of the current stream will be added to the selection as it appears.
  • Scan - Every time a new scan appears it will be plotted, by itself.
  • None - NICE will not change the current selection in response to new data. Choose this option if you want to setup a completely custom plot while collecting data.


Each scan contains a lot of information which can potentially be plotted. Configuring what data to show will determine your plot's axes. These axes can then be configured in a variety of ways.

Variable Selection

The bottom of the window allows you to setup what variable (aspect) of the currently selected scans you are plotting.

  • X - This determines what is graphed on the x-axis of the plot. This will typically be something changing during your scan such as a motor's position. However, it can be any other quantity you scanned such as energy or temperature.
  • Y - This determines what is graphed on the y-axis of the plot. This will typically be count variables such as particular detector's channel or sum. You can plot multiple y-axis values simultaneously.
  • Norm - This allows the y-axis value to be normalized (divided) by another value. This division is done on a point-by-point basis.

If you select multiple choices for Y, then each scan/Y-variable combination will be plotted with a unique style! Be careful, the total number of data series shown in the graph will be the product: <number of selected scans> * <number of selected y-variables>

Note: When selecting multiple y-axis values, the first selection determines the unit of the axis. This will almost always be a dimensionless "neutron count" unit. However, if you graph time, this will be seconds. You cannot plot values with differing dimension simultaneously (the incompatible plot will be shown as "unplottable").

Auto Select (Variables)

Whenever the plot selection changes NICE will potentially change the current selected variables used for plotting. NICE uses the following rule:

  • Distinct selection: If the new selection, is complete distinct from the previous selection (no scans in common) then it will automatically choose the default variables specified by the first stream in the new selection, unless...
  • Locking: Next to each variable is a check box labeled "lock". If checked, this variable will never be automatically changed by NICE.

The result of these rules, is that by default, each time a new data stream starts, NICE clears the current scan selection and chooses the first scan of the new stream. This is a "distinct selection" resulting in the axes being automatically reselected. This is generally what is desired when viewing live data.  


Whenever an axis variable is changed, or the scan selection changes, both axes will go into auto-range mode automatically. When switching to this mode the graph will automatically jump to a view which fits the current data and will update automatically whenever new point is added to any of the scans being graphed. Auto-range mode is turned off, for both axes, automatically, if you pan or zoom.

Axis Configuration

You can right-click on either axis to get a menu with several options for configuring the axis. Here is a description of these options:

  • Log - If checked the axis is shown in a logarithmic scale.
  • Ticks - Allows you to adjust the length and density of the ticks. Density is limited at the point where tick labels start to overlap.
  • Auto-Range - The padding option allows you to set the buffer around the boundary of the plot, when auto-ranging. You can also choose whether unplottable and zero (log plot) values are shown by auto-range. You can also manually toggle if the axis is in auto-range mode.
  • Breaks/Discontinuous Values - Turn on/off showing special values such as unplottable and zero (log plot) right now.

Special Plotting Situations

On some instruments, special plotting situations have been setup. For example, when plotting a radial detector's individual channels against a specific angle, you might want to graph them at their actual angle in space. Each special plotting situation is described by 4 pieces of information:

  • Plotted X-Variable - The variable chosen to be plotted on the x-axis, which will trigger special plotting.
  • Plotted Y-Variable - The variable chosen to be plotted on the y-axis, which will trigger special plotting.
  • Substitution X-Variable - The x-variable which will actually be plotted against
  • X-Variable Offset - How to offset the value when plotting

Example: A radial detector's position is controlled by motorX. However, the scientist would like to graph the angle of each detector channel, on the radial detector, relative to the conceptual angle theta representing a geometrical relationship on the instrument. To achieve this, a special plotting situation will be setup for each detector:

Plotted X-Variable: theta

Plotted Y-Variable: radialDetectorXX

Substitution X-Variable: motorX

X-Variable Offset: theta_of_radialDetectorXX = motorX + offset

Note: Special plotting situations are setup on a case-by-case basis, on each instrument, as requested by the instrument scientists. Ask your local contact for information about your instrument. If you are an instrument scientist and want something like this setup on your instrument contact the NICE team.


When performing a findpeak, the data stream will also include a fit. Assuming the fit succeeded, and the default axes are selected, it will automatically be graphed along with the data and you'll see a Fit Results panel appear next to your plot. This panel shows all the information associate with your fit and provides the ability to "move to fit", which move the x-axis variable to its fit position.

If you graph multiple findpeaks, they may each have a fit. All fit lines will be graphed simultaneously, but only one fit may be selected at a time (select by left-clicking on a fit line). The selected fit will have a thicker line on the plot and its details will be shown in the Fit Results panel.

Note: If you mouse-over a fit you can preview it in the Fit Results panel, without selecting it.

Note: You can ONLY see a fit if you've selected the correct axes. The x-variable will need to be whatever you scanned, while the y-variable will need to the data-of-interest for the findpeak. Norm will always need to be set to unnormalized. Unless you've changed axis variables manually the correct axes will be selected by default.

Other Features

You can interact with the plot by panning and zooming as described in the controls section above. Here are a few other things you can do:

  • Move to Point - Hover on a point to get a popup window with point information. Click "Move to Point" in the resulting popup to move the x-variable there.
  • Show Connecting Lines - Right-click on a series and choose it from the context menu.
  • Show Coordinates - Right-click on an arbitrary position.
  • End Count, but Not the Findpeak/Trajectory - Click End Count in the lower right of the panel. This will simply end the current count early, but has no other affect on data collection or the queue.
  • End Findpeak, but still perform fit - Click End Findpeak in the lower right of the panel. This will end the current findpeak early when the current point finishes. It will still perform a fit with the data it collected so far.
  • Open an New Plotting Window - Click New Window in the lower right of the panel. This new window can be used to setup a separate, independent plot. For example, you could have one window show live data, while browsing old data with another window.

Caching and Future Changes

A feature which has been requested many times, from the NICE team, is the ability to view any scan from the history of the instrument. While this feature is not available, yet, the current plotting system was built with this feature in mind. In the near future, we hope to upgrade the system to allow it. In the meantime, the NICE client provides the following limited plotting capability:

Whenever the client starts it will always have the current/last stream available for plotting. Until closed, the client will accumulate any new stream, in its cache and they will be available for plotting as well. This accumulation will continue until the current cache is filled. At that point the least recently viewed streams will be removed from the stream and be unavailable for plotting.







Created April 26, 2022, Updated October 17, 2022