Text Placeholders

A frequent support question is along the lines of "How do I automatically display the <min, max, mean, std. deviation, etc.> of a curve in a <title line, axis label, legend entry, note, etc.>"? Text placeholders have been available for a long while, but for whatever reason aren't noticed by many users. You'll probably find all the information you need in the linked Help topic, but this post will walk through an example of how this feature can be used. In the example below we'll work with a bubble plot because it has at least one oddity that isn't the case for most other plot types.

The particulars of this graph aren't really important in this case. The data consists of two "curves"; the bubble magnitudes come from the second curve. The rainfall rate values (bubble magnitudes) vary from ~2.1 - ~11.7. The user in this case wanted to display the rainfall rates in the legend entry for the plot. It would of course be easy enough to type those values for the legend, but we'd like something a bit more automatic that can be stored in a preferences file and/or set in a macro to get the same results for other data. If the legend entry is set to:

$YMIN(2) - $YMAX(2) inches/hr

...then the result looks something like:

The (2) index references the 2nd curve (the bubble magnitudes). If the (2) were not included, then the legend would use the minimum and maximum values of the "Runoff" curve.

This is fine, but displays more significant figures than we'd like. Text placeholders can include an equation, and the equation itself can contain other text placeholders. So we can use the MROUND function:

$=(MROUND($YMIN(2),0.1)) - $=(MROUND($YMAX(2),0.1)) inches/hr

... to round off the rainfall rate values to the nearest 0.1, and get:

Questions? Let us know.

About this Entry

This page contains a single entry by David Hyde published on August 13, 2009 8:28 PM.

Plot overlays was the previous entry in this blog.

Help! DPlot's Help doesn't work! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Categories

Pages

Powered by Movable Type 4.25