Code covered by the BSD License  

Highlights from
Scale bar for 2D axes

Be the first to rate this file! 10 Downloads (last 30 days) File Size: 3.49 KB File ID: #25799
image thumbnail

Scale bar for 2D axes

by Amanda

 

11 Nov 2009

Creates a scale bar in a 2D axes. The length, location and colour of the scale bar are customisable.

| Watch this File

File Information
Description

SCALEBAR creates a scalebar on an axes
 
  SCALEBAR
  SCALEBAR OFF
  SCALEBAR(PARAMETER, VALUE, ...)
  SCALEBAR(HAXES, PARAMETER, VALUE, ...)
  H = SCALEBAR(...)
  
  Draws a scalebar on the axes and returns handle to the scalebar. The DataAspectRatio property of the axes must be set to [1 1 1] and the view must be in 2D. All parameters are optional (note the default values below). SCALEBAR OFF deletes the current scalebar.
  
  PARAMETER/VALUE pairs
      hAxes: handle to the axes (defaults to current axes)
      ScaleLength: length to show (in data units) (defaults to ~10% of the x-axis limit range)
      ScaleLengthRatio: ScaleLength/range(XLim)
      Location: location of the scalebar. Possible values are
                    northeast (default)
                    northwest
                    southeast
                    southwest
                    [x y] data coordinates
      Colour: colour of scalebar in 1x3 RGB array (default is [0 0 0])
      Bold: draw with bold text and linewidth=2. True or false(default)

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
scalebar Amanda 11 Nov 2009 17:43:00
axis Amanda 11 Nov 2009 17:43:00
graphics Amanda 11 Nov 2009 17:43:00
image Amanda 11 Nov 2009 17:43:00
scale Amanda 11 Nov 2009 17:43:00

Contact us at files@mathworks.com