Navigation:  Menu Commands > Options Menu >

Background Image command (Options menu)

JR   Viewer

Print this Topic Previous pageReturn to chapter overviewNext page

This command allows you to specify an image (BMP, GIF, JPG, PNG, or TIF) that will be drawn within the plot extents. The image will be stretched to fill the plot exents, regardless of its width/height relative to the plot width/height. To delete an existing background, delete the text in the Filename text box.

Background images are only applicable to 2D views of your data, and are not used for polar plots or triangle plots.

Use full extents of image

If checked, the entire image will be used. If unchecked you may specify the top-down coordinates (0 is at the top of the image, in other words) of the image to display. The left, top, right, bottom text boxes will be disabled until/unless you select an image. Valid values are 0 to width-1 for the left and right; 0 to height-1 for the top and bottom. The left value must be less than the right, and the top value must be less than the bottom.

Force plot extents to match aspect ratio of image

If checked then the plot extents will be adjusted such that the image has a 1:1 pixel ratio. For example if the image is 800 x 600 pixels and this box is checked, then the width and height of the plot will be set to a 4:3 ratio. If "Specify plot size" was previously selected and the current settings do not match the image aspect ratio, then the maximum dimension will be used for the larger of the width/height. If "Specify plot size" has not been previously selected then the maximum dimension will be set to 8 inches. This adjustment takes place at the time this command is used and is not persistent: Subsequently changing the plot size with the Extents/Intervals/Size menu command or by dragging the corners of the plot may result in a distorted background image. (If you do this unintentionally, you can easily restore the plot aspect ratio by again selecting the Background Image command and immediately clicking OK w/o making any other changes.)

Draw in foreground

If unchecked then the image is drawn before any other items. If checked then the image is drawn after all other items.

Transparency

Global transparency value applied to entire image. Valid range is 0 (invisible) to 255 (opaque). Default value = 255 (opaque).

Background Color

Color that will not be drawn. This setting is disabled for 32-bit images with an alpha channel.

 

NOTE: The image is not saved to a DPlot file. Instead, the filename of the image is saved within the file. The absolute path to the image is saved unless 1) the image resides in the same folder as the DPlot file, or 2) the image resides in My Documents\DPlot\Images. This presents a problem if copying a saved DPlot file to another system: if the path to the image does not exist on the target machine then the image will not be found. For the best results on multiple systems, copy the image file to the same folder where you will subsequently save the DPlot file, or to My Documents\DPlot\Images, before you specify that image. If you do that, the image location within the DPlot file will not include a path and the file will be expected to reside in one of those two locations. When reading a DPlot file, images saved to the DPlot file's folder take precedence over images saved to My Documents\DPlot\Images.

Example: GPS recording with a background image from Google Earth.

This feature can also of course be used to fill the background with a gradient. The example below uses a 1-pixel wide background image, with Force plot extents to match aspect ratio of image unchecked.

NOTE: If you select a new image with the Browse button and the width is 10 pixels or less and the height is 100 pixels or greater, or vice versa, DPlot will automatically uncheck the Force plot extents to match aspect ratio of image box, under the assumption that this image is simply a gradient. If you subsequently check that setting, your preference will be preserved.

 

Related macro commands

SetBackgroundImage

 

 


Page url: https://www.dplot.com/help/index.htm?helpid_background_image.htm