Plotting
The Plotting tab (Fig. 29) can be used to compose plots with multiple data sets and/or analysis results. These plots can be used just within DearEIS to compare different results side-by-side. However, these plots can also be used to prepare relatively simple plots for sharing and/or publication. The plot settings can also be used via the API provided by DearEIS, which means that the basic layout can be prepared via the GUI and then the final plot can be generated programmatically. This approach would also mean that a plotting library other than matplotlib, which is the default backend for exporting plots using DearEIS, could be used instead.
Selecting items to plot
The Available tab (Fig. 30) contains entries for all of the data sets, analysis results, and simulations contained within a project. Individual items can be selected by ticking their corresponding checkboxes.
The Filter input field can be used to search for specific items. The labels of analysis results are treated as if they also contain the label of the data set that they belong to, which means that filtering based on a data set’s label will also include the analysis results belonging to that data set. Using a hyphen, “-”, as a prefix is equal to a logical not (i.e., “-noisy” excludes items with “noisy” in their labels). Multiple filter terms can be used by separating them with commas. If one or more spaces, “ “, are typed in this field, then all of the headings are expanded. Similarly, if the input field is cleared, then all of the headings are collapsed.
Each heading contains buttons for (un)selecting all items within that heading and buttons for expanding/collapsing all subheadings. There are also buttons for (un)selecting all items regardless of the heading they fall under. Items that have been selected are added to the Active tab.
Customizing selected items
Selected items are listed in a table in the Active tab and several aspects of those items can be edited. An item’s label, which is used in the plot’s legend, can be overridden by typing in a new label. If one or more spaces, “ “, are given as the new label, then the item will not have an entry in the legend.
An item’s appearance (color, marker shape, and whether or not it should have a line) can be edited from the popup window that appears when clicking the Edit button (Fig. 32). The U and D buttons can be used to adjust the order of an item when generating a plot, which affects the legend and whether or not an item will either be covered by or be covering some other item.
If specific items should have the same appearance across multiple plots, then there are two approaches for conveniently copying the relevant settings from one plot to another. The first approach is to have a main plot (e.g., labeled Appearance template) that is used simply to define the appearance of items. This main plot can then be duplicated, which also copies each item’s settings, and modified. The second approach is to use the menu that is accessible via the Copy appearance button (Fig. 33) to copy item settings from another plot. One can choose which plot to copy from, which items to copy settings from, and which categories of settings to copy (label, colors, etc.).
Exporting plots
Plots can be exported (i.e., saved as files) using matplotlib (Fig. 34).
The plots (PlotSettings
) and the items (PlotSeries
) included in the plots are also accessible via the API.
This means means that one can compose a plot using the GUI and generate the final plot using the API, which allows for batch exporting and also for greater control of a plot’s appearance.
Warning
A subset of users may encounter crashes when attempting to export plots. This issue appears to affect systems running Linux together with an nVidia GPU and proprietary drivers.
Unticking the Clear texture registry
setting in Settings > Defaults > Plotting tab - Export plot > Miscellaneous
may resolve the issue.
However, unticking this setting means that any memory allocated to previewing matplotlib plots is not freed until DearEIS is closed.