Set figure properties for printing
axesm-based map at map scale
[paperXdim,paperYdim] = paperscale(...)
the figure paper position to print the map in the current axes at
the desired scale. The scale is described by the geographic distance
that corresponds to a paper distance. For example, a scale of 1 inch
= 10 kilometers is specified as
See below for an alternate method of specifying the map scale. The
surface distance units
sunits can be any
unit recognized by
The paper units
punits can be any dimensional
units recognized for the figure
the paper position so that the scale is correct at the specified geographic
location. If omitted, the default is the center of the map limits.
specifies the direction along which the scale is correct. If omitted,
90 degrees (east) is assumed.
specifies the units in which the geographic position and direction
are given. If omitted,
'degrees' is assumed.
paperscale(paperdist, uses the last input to determine the
radius of the sphere.
radius can be one of the
values supported by
it can be the (numerical) radius of the desired sphere in
If omitted, the default radius of the Earth is used..
the numeric scale replaces the two property/value pairs, specifies
the scale as a ratio between distance on the sphere and on paper.
This is commonly notated on maps as 1:scale (e.g. 1:100 000, or 1:1
000 000). For example,
[paperXdim,paperYdim] = paperscale(...) returns
the computed paper dimensions. The dimensions are in the paper units
specified. For the scale calling form, the returned dimensions are
Maps are usually printed at a size that allows an easy comparison of distances measured on paper to distances on the Earth. The linear ratio between the mapped size of objects to the real size of objects is called the map scale. It is usually expressed as a ratio, such as 1 to 100,000 or 1:100,000 or 1 cm = 1 km. Another way of specifying scale is to call out the printed and real lengths, for example "1 inch = 1 mile."
To ensure your map can be printed correctly, you can specify the printed scale
paperscale function. It modifies the size of the
printed area on the page to match the scale. If the resulting dimensions are
larger than your paper, you can reduce the amount of empty space around the map
zoom, and by changing
the axes position to fill the figure. This also reduces the amount of memory
needed to print with the
zbuffer (raster image) renderer. Be
sure to set the paper scale last. For
set(gca,'Units','Normalized','Position',[0 0 1 1]) tightmap paperscale(1,'in', 5,'miles')
paperscale function also can take a scale denominator
as its first and only argument. If you want the map to be printed at
To check the size and extent of text and the relative position of axes, use
previewmap, which resizes the figure to the printed
For more information on printing, see Printing and Saving.
The small circle measures 10 cm across when printed.
axesm mercator [lat,lon] = scircle1(0,0,km2deg(5)); plotm(lat,lon) [x,y] = paperscale(1,'centimeter',1,'km'); [x y] ans = 13.154 12.509 set(gca,'pos', [ 0 0 1 1]) [x,y] = paperscale(1,'centimeter',1,'km'); [x y] ans = 10.195 10.195
The relationship between the paper and geographic coordinates holds only as long as there are
no changes to the display that affect the axes limits or the relationship
between geographic coordinates and projected coordinates. Changes of this type
include the ellipsoid or scale factor properties of the
axesm-based map, or adding elements to the display
that cause MATLAB® to modify the axes autoscaling. To be sure that the scale is
paperscale just before printing.
Introduced before R2006a