Visualize Dakota Output Data

The Dakota GUI provides simple plotting capabilities that allow you to explore your data output.  Currently, three types of plots are supported:  scatter plots, box-and-whisker plots, and histograms.  There are plans to add support for more types of plots in future releases of the GUI.

Before we begin plotting, there are three major plotting concepts to talk about.  Understanding these will give you a lot of flexibility in the types of plots you can create.

Plot Trace – A plot trace is the most basic grouping of information that can be visualized in the Dakota GUI.  A trace represents a single Dakota variable (either parameter or response) visually rendered in some way.  To give a basic example, a trace could be a series of points plotted on a Cartesian plane (i.e. a scatter plot).  A trace can also be represented in other ways that we don’t naturally think of as a “trace” (such as histograms, box-and-whisker, etc.)

Plot Canvas – A plot canvas can contain one or more plot traces.  It is a visual grouping of multiple Dakota variables on the same set of axes.

Plot Window – A plot window is the top-level container for a graphical visualization of Dakota data.  A plot window can contain one or more plot canvases.  Right now, only one plot window can be rendered at a time, but you can have multiple plot windows in your Dakota GUI project.  Plot windows are the elements available in the Dakota project navigator view.

Plot a Single Trace

You may not want to mess with the idea of multiple canvases or even multiple traces.  If you just want a single trace outputted quickly, you can click on the “Plot a single trace from this run result data” link provided in the Run Results settings editor view (A single plot window and a single plot canvas are automatically provided for you under the hood):


You will be presented with the following dialog:


The Plot Trace Creator is a powerful dialog that puts a lot of plotting control at your fingertips.

Let’s talk about the Plot Window Settings options group first.  These are options global to your entire plot window:

Plot Title:  The title displayed at the top of your plot.

X Axis / Y Axis:  The labels for your X and Y axes.  For simple traces, this is auto-populated for you.

Font:  The font used by your graph.

Plot Size:  The size of your plot in pixels.  By default, the plotting library will scale your plot to fit within the Dakota GUI Plot View.  These options are useful for customizing if you’re interested in exporting your plot at a large size (for instance, for a publication), or if the default view of your data is too crowded.

To get started with an example, select “Scatter Plot” from the “Plot Type” combo box.


From here, you have even more options!  These options are all specific to scatter plots.

Trace Name:   A custom label for your data trace.

X/Y:  Data for the X and Y dimensions of your scatter plot.  You can choose any combination of Dakota parameters and responses.  You can also choose [Time] which allows you to plot using the monotonically increasing number of Dakota iterations.

Dot Type:  The shape of your plot points.  Plotly (the default plotting library in the Dakota GUI) provides dozens of shapes you can use.

Dot Color:  The color of your plot points.

Draw Lines:  Select this checkbox to connect the points of your trace with a line.

Trim No Change:  Ignore areas of your data where nothing changed (either along the X or Y axis)

Normalize Data:  Scale your data to fit between 0 and 1 (either along the X or Y axis)


When you’re done, click OK (you may need to rescale the dialog if the OK/Cancel buttons get pushed off the bottom)


Plot View Controls

A quick interlude to talk about the Plot View.  You will notice two icons in the top-right corner:


Refresh:  Re-render the plot to fit the view.  This is especially useful if you rescale the Plot View (i.e. to take advantage of more screen real estate) and would like to view the plot in more detail.  However, if you have already specified a custom size for this plot window (see the Plot Trace Creator instructions), the plot won’t resize to respect the size of the view.  You will need to go back in and edit your plot window to make it use the default option of whatever screen size is available.

Save Screenshot:  Saves what you see on the screen as an image file on your computer.

Options for Already Created Plots

After plotting a single trace, the promised “single canvas, single trace” plot window has been added to your project.  Right-clicking it gives you some options:


Show Plot:  Re-render this plot in the Plot View.

Edit Plot:  Go back and make modifications to this plot.  Clicking this will open the more sophisticated Plot Manager (more on that in a minute).

Delete Plot:  Remove the plot from your project.

The Plot Manager

The Plot Manager dialog is the big brother to the Plot Trace Creator that we just went through.  The Plot Manager allows you to specify multiple canvases with multiple traces.  You can get extremely sophisticated with this dialog, so there are a lot of options to cover.

First, to open the Plot Manager, you have two options.  You can click “Open Plot Manager” from any run result settings editor view:


Alternately, you can right-click an existing plot in the Dakota project navigator view and choose “Edit plot” to pre-populate the Plot Manager dialog with that plot’s info:


Upon launching, this is what the Plot Manager looks like by default:


Choose a plotting template:  This option allows you to populate the entire Plot Manager dialog with configuration for certain types of exploratory plots.  Don’t click this button for now… we will come back to this later.

Title:  The title for your plot.

Number of Canvases:  Number of canvases you want, specified by grid dimensions (i.e. 3 X 2 will give you three rows and two columns of canvases).

Font:  The font for your plot.

Show Legend:  Display a legend for every trace plotted.

Plot Size:  The plot size in pixels.  Leave this blank to let the plot fill the available space in the Plot View.

For our cantilever example problem, let’s try plotting L/mass and w/mass on two separate canvases oriented horizontally.  To do this, populate the Number of Canvases fields with “1” and “2” and push the “Build Plot Canvases” button.  The Plot Manager dialog should now look like this:


If you want to add to your already-created canvas grid (though we don't need to for this example), you can add additional rows and columns by using the Add Row and Add Column buttons.  (Note that we don’t need to go back to the Number of Canvases fields, provide new numbers, and hit Build Plot Canvases again.  In fact, hitting Build Plot Canvases again after populating data onto your canvas grid is discouraged, as Build Plot Canvases always creates a blank canvas grid, so this will remove any previously specified data.)

We now have some new options.  Note the three blank fields – one to the left and two along the bottom.  These are axis labels provided for our canvases.  Because we are interested in “L/mass” and “w/mass” we can label the axes accordingly:


In the middle of this dialog, we have a rough preview of how our canvases will look – i.e. we have two boxes that are displayed side-by-side and horizontally.  We can edit what will go onto each canvas by pushing the respective “Edit canvas” button.  Clicking on “Edit Canvas” will do two things – it will highlight the canvas that we are working with, and activate the canvas-specific controls along the right side of the dialog:


Add/Edit/Remove:  These buttons pertain to traces on the canvas.

Remove My Row:  Remove the row of canvases that the currently selected canvas is in.  (We currently don’t have the option to remove a single canvas from a grid, leaving a blank space in its place.  You must think about your canvases in terms of the grid)

Remove My Column:  Remove the column of canvases that the currently selected canvas is in.  (We currently don’t have the option to remove a single canvas from a grid, leaving a blank space in its place.  You must think about your canvases in terms of the grid)

Clear Me:  Remove all traces on the currently selected canvas.

Click Add to add a trace to your canvas.


With this dialog, you have two options:

  • You can grab a trace you’ve previously created (from any plot in your Dakota project) by using the All Traces dropdown.
  • You can create a new trace, which takes you back to the Plot Trace Creator that we already covered.

You should have enough information now to proceed on your own with populating traces onto the canvas.  Put an “L/mass” scatter plot trace onto the left canvas and a “w/mass” scatter plot trace onto the right canvas.  Take some creative liberties with specifiying color and point shape!  When you’re done, your Plot Manager dialog should look something like this:


Note that the canvas previews give us summary information about how many traces are on each canvas.

When you’re satisfied that you’re done, hit the Plot button to see your plot in the Plot View.


If you did something wrong, or if you’re not satisfied with the way your plot looks, you can immediately get back to where you left things in the Plot Manager dialog by right-clicking your newly-created plot in the Dakota project navigator view and choosing “Edit plot” from the context menu.

Plotting Templates

Manually populating all of this information into the Plot Manager dialog becomes increasingly time-consuming as you add more canvases and traces.  For instance, suppose you want to see all parameters and responses for the centered parameter cantilever study that we ran, and suppose you want one canvas per response, and a trace for each parameter on each canvas.  This would be a total of 21 traces, which would take a long time to manually input, not to mention the fact that doing so is error-prone, requiring lots of trial and error to get the plot exactly the way you want it.

To alleviate this somewhat, we have provided the concept of “plotting templates,” which are pre-baked configurations for the Plot Manager dialog.  To access all available plotting templates, click on the “Choose a plotting template” button in the top-left corner of the Plot Manager dialog:


For the current version of the GUI, we only have one plotting template available (one that satisfies the scenario described above), but the Dakota team is planning on adding more plotting templates to future versions of the GUI.


Hit OK with the above options selected and you’ll be taken back to the Plot Manager dialog with everything populated for you:


Hit the Plot button and you’ll get the response comparison view of the cantilever centered parameter study that we just ran (you’ll most likely need to expand your Plot View and refresh to see everything):


A couple of things to note:

  • For each trace, a random color and shape is automatically selected for you, but as you might expect, you can go back into the Plot Manager dialog, drill down to an individual trace, and change the color and point shape if you wish.
  • Plotly provides quick comparison data about surrounding points in a trace by hovering the mouse over points on a trace.
  • Right now, all three canvases adhere to the same scale, so mass and displacement data are difficult to see compared to the scale for stress data.  The Dakota team has plans to add a future enhancement to allow for different scales per canvas, but for right now, you can use the provided Plotly Javascript controls (hover over the top-right of the white area of the Plot View window) to zoom in and inspect the data:
  • DakotaGuiTutorialImage69.png