a scale bar in one corner of a map: a round length near a tenth of its width, written above the bar, and above it the axes of the specimen frame as they lie on the screen
Syntax
label = scaleBarOn(mP)
In the lower left corner.
label = scaleBarOn(mP, location='ne', length=500, color='w', background='k')
500 um, white on black.
Description
Every map plot draws one unless micronbar=False, so this is what to call to draw one into a map plot without, or to draw it again elsewhere; it replaces the bar the map plot had. The length is a round number near fraction of the width of the map, in a unit that keeps it readable (nm, um, mm).
Input
mP |
mapPlot, the map plot to draw into, mapPlot(h.axes, ebsd) of a map drawn as h |
x |
the map or grains drawn; the extent is taken from mP, so it may be left out |
Keywords
| keyword | default | description |
|---|---|---|
location |
'sw' |
the corner, ‘sw’, ‘se’, ‘nw’ or ‘ne’ |
fraction |
0.1 |
the length of the bar as a fraction of the width of the map, about |
refFrame |
True |
draw the axes of the specimen frame above the bar |
color |
'k' |
the colour of the bar, the text and the frame of the box |
background |
'w' |
the colour of the box |
alpha |
0.75 |
the opacity of the box |
length |
None |
the length of the bar in the map’s unit instead of a round one |
Output
label |
str, the length written on the bar, None when the map has no extent |
See also
EBSD.plot, scaleBar, EBSDPlotting
source
Citing this page.
This page is part of the documentation of
MTEX, a free and open
source MATLAB toolbox for analyzing and modeling crystallographic textures.
It was written by The MTEX Developers and is published at
https://mtex-toolbox.github.io/scaleBarOn_py.html.
If you use MTEX, or reuse text or figures from this page, in your research,
please cite
F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63
BibTeX
@article{bachmann2010mtex,
author = {F. Bachmann and R. Hielscher and H. Schaeben},
title = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
journal = {Solid State Phenomena},
volume = {160},
pages = {63-68},
year = {2010},
doi = {10.4028/www.scientific.net/SSP.160.63},
url = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}
Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.