Plot

Description - This class represents a 2-D display of information in the graph. Functionally it is composed of many helper classes, but those aren't significant to the user so we discuss the entity as a whole here. While currently there is only one plot type at this level, allows data to be displayed in many ways inside of it. As with the other elements of the graph, when the menu option is selected, a new rectangle appears in the graph, now with the label "Plot". If a data source was selected at the time, the plot is automatically connected to that source.

The properties for the plot are the most complex of any of the elements. The initial panel simply shows a tree with only a root and buttons for adding a plot or adding text. Clicking those buttons adds things to the tree. By clicking on them in the tree you can set their properties. The text properties are fairly straightforward. It is the properties of the plot area that are complex. The properties panel for the plot area is tabbed with 7 subpanels: Data Sets, Layout, Axes, Geometry, Legend, Listeners, and Labels. We'll look at each of these individually.

The first tab is labeled Data Sets though it actually allows the user to select not only the data, but also the way in which the data is displayed. It is the one that is displayed by default and likely the one you are going to use the most. There is a list at the top of this panel showing the different data sets that have currently been created. When you create a new data set, you are given a list of options for what type to create. When you select a data set, the options you see depend on the type of the representation that is selected. By default a plot starts with data being represented in a Scatter Plot. Currently there are 14 data representation options. Each one, and its options, are discussed separately.

The second panel is the Layout panel. The plot area is actually broken into a grid of plots. This grid will start off as being 1-by-1. These plots will share various axes and you can specify different data sets or different ways of plotting data in each grid area. The top portion of the layout panel is a drawing of the grid. Clicking on the grid will select a cell. The specific cell is colored with a dark gray, while the rest of the row and column are highlighted with a light gray. Above the grid are buttons to add/remove rows/columns. Adding adds above or to the right of the selected cell. Below the grid is the information for relative size as well as what data sets and axes are going to be used for the given cell/data set. The relative size options impact entire rows or columns and allow you to adjust the size of the rows/columns in the final plot. The size of each row is a fraction of the full plot area determined by taking the relative size of that row and dividing it by the sum of the relatives sizes of all the rows.

The options below the size specifications allow you to pick what data sets are shown in a particular grid cell and what axes each of the data sets will be plotted against. To add additional data sets to a grid cell, simply click on the "Add" button and specify the data set you want to add. If you have multiple data sets of the same type you will likely want to go to the Data Set tab and change the names of some of them to help you recognize each one in other menus. Clicking "Remove" will remove the data sets that is currently selected in the list.

Below the data set list are lists of the axes that have been created. For each data set you get to select one axis to be used as the x-axis and one to be used as the y-axis. When you click on a data set in the list, the selections on the axis lists will be changed to reflect the axes that data set is using. A given axis can be used for multiple data sets and could be used as both an x and a y axis (though that probably isn't beneficial most of the time). By default a new data set will always have the first axes selected for x and the second axis for y. If there is only one axis it will be used as both x and y. Deleting axes from the axes tab also returns these settings to their default.

An example of how to use this would be if you wanted to view both the eccentricity and inclination evolution of a particle and you wanted to put them in the same plot for comparison purposes. If you add both data sets to the same cell, they will be overplotted. You would want to share the same axis for x, showing the time in the simulation, but select separate y-axes for the two. You can make extra axes using the axis tab. If you want the two data sets plotted in a stacked manner instead of in the same area, simply click "Add Y" to make a new row of cells then click on the top one and add the data set you want on top. Again, you will likely share the same x-axis, but use separate y-axes.

The axis panel is similar to the data set panel. It allows you to add or remove axes as well as to change the settings on those axes that have been created. By default, two axes are created for you with labels of "X axis" and "Y axis". The options on axes include labels, ranges, and setting how frequently ticks and value labels should be shown. You can also choose to put the labels on the minimum or maximum side of a plot as well as alter the font and color that it is drawn with. If you have two axes on a the same row or column in a plot you will probably want to make one of them display on the minimum side and one display on the maximum side. Also, there is an option for making the scaling of an axis logarithmic.

The Geometry panel is fairly simple. In it you get to specify the location and size of this plot component in the full plot area. All values are specified as percentages with 0,0 being the top left and 100,100 being the bottom right. Percentage values like this are also used for any top level text added to the plot.

The fifth tab is the Legend tab. This allows you to add legends for each of the data sets into the plot. The top of the panel includes four settings for where the legend should appear. These are just like the settings for the geometry and should be specified as percentages of the whole plot area. Below this is a list of the different data sets that you have created. Selecting one of these brings up the properties of the legend for that data set. The legend specifications are somewhat different for each of the different types of data sets, but are generally fairly self-explanitory. If the plot style includes a color gradient option, the legend will generally give you all the option for an axis that is drawn across the edge of the gradient.

After the Legend tab is the Listeners tab. This allows you to attach different listener filters to each cell in the plot area. The top part of this panel is a grid just like that in the Layout tab. There are buttons to add or remove listener filters from the selected cell. If any listeners are selected for the current cell, they will appear in the list below the buttons. Selecting a listener from the list will give you options for it. The primary options include whether that listener should be able to draw in a highlighted region on the plot and what color that highlighted region should be.

The last tab is the labels tab. By default it looks just like the Listeners tab with a grid of cells, add and remove buttons, and a list of labels in the currently selected cell. The labels can be text or geometrical figures. Again, selecting a label brings up the options for that label. For text the options include settings for what text to draw, how to draw it, and where to draw it. The location can be a full formula that will be evaluated on the first element of the input. You can place a label near a point by using the "Point Position" option and a special selection in the formula with something like this "{v[0], p[0]=-5} v'[1]". This will select the first occurance of the particle with index -5 and return the semimajor axis of that particle. For point position, the text appears next to the specified location on the plot coordinates. The other options place the text relative to the boundaries of the plot area and the values are offsets in pixels. For geometric labels the positions and sizes can again be formulas and they are evaluated in the same way.

Input - The Plot element can take multiple inputs. In general, the data that is plotted is specified with a data formula so the user can specify there which input to take the data from.

Memory - By this point you should only have the data that you really want to plot coming in. If memory is a problem, drawing time will be a much bigger one.