The Draw Subset Polygon () action allows you to mark out a region of the plot by clicking on the vertices of a polygonal shape, generating a corresponding algebraic expression to define a subset. This can be particularly useful (and a better option than the blob) if you want to refer to the subset outside of the context of the current session, for instance in a STILTS command or a published paper.
This action is currently only available in the Plane plot.
Defining a subset by polygon drawing. In this case, mode BELOW is in use.
When you use a polygon to define a region of the plot, it operates in one of a number of inclusion modes: INSIDE, OUTSIDE, BELOW, ABOVE, LEFT and RIGHT. For the INSIDE and OUTSIDE modes, the points you supply define a closed polygon, and the region of interest is inside (or outside) that polygon; at least three points are required in this case. For BELOW and ABOVE, you draw a jagged line representing a continuous function of x (but with, in general, a discontinuous derivative), and the region of interest is all the area with a y value lower (or higher) than that function. LEFT and RIGHT do the same thing for a function of y instead of x.
To start drawing a polygon, hit the button in the toolbar, and a popup window will first ask you which inclusion mode you want to use. Alternatively, you can use one of the mode-specific sub-menu items in the Subsets|Draw Subset Polygons menu to choose a mode without the extra popup.
Once in polygon drawing mode, the toolbar button will appear with a checkmark over it (). You can then click on the plotting area to mark the vertices of a polygon, and the area thus defined (according to the mode you have chosen) will be shaded in grey. A right-click (or Ctrl-click) will remove the most recently-added point. For INSIDE and OUTSIDE modes, at least three points are required to define a polygon. For the other (function-like) modes, line segments at either end of the line are considered to continue to infinity - it's easy to understand how this works by trying it out. As a special case, when you have only marked one point, the specified region is considered to be the whole area to one side of that point.
When you've finished adding points, click on the button again. This will pop up a window that displays the algebraic function corresponding to the region you have outlined.
Dialog window showing subset expressions to add
If multiple datasets are present in the plot, the region will correspond to multiple algebraic expressions, and they will all be displayed here in separate rows. Each row corresponds to a subset that will be added for the table in question. The Table column indicates which table the subset will be added to, the Create column indicates whether that subset should be added; you can uncheck it if you don't want to add that subset. The Expression column gives the algebraic expression corresponding to the region you have outlined. You can edit this before accepting it if you like by double-clicking on the field in the usual way. If the expression contains a syntax error, it will be greyed out, and attempting to add it will cause an error; you can uncheck the Create checkbox if you want to exclude it.
When constructing the algebraic expressions,
an attempt is made to provide the simplest form possible;
if the shape is just a line, then only arithmetic
operators are used, but if there are more than two points,
one of the functions in the Shapes class
will be used. For the BELOW mode (and analogously for
ABOVE, LEFT and RIGHT) , the expression will be of
the reported function
f(x) can be plotted separately
using the Function Layer Control
Examples of expressions created by this mode are:
DEC >= -20.5
loggK < -0.00081 * (TeffK - 4209) + 3.86
log10(uwe) < polyLine(phot_g_mean_mag, 21.3,0.05, 18.9,0.06, 4.1,1.66)
!isInside(BMAG-RMAG, BMAG, 3.3,19.7, 3.0,14.7, 7.8,10.3, 8.1,14.9)