| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Mapping Toolbox |
| Contents | Index |
| Learn more about Mapping Toolbox |
project(h)
project(h,'xy')
project(h,'yx')
project(h) takes unprojected objects with handles h that are displayed on map axes and projects them. For example, project takes a line created on a map axes with the plot function and projects it as though it had been created with the plotm function. This can be useful if a standard MATLAB function was accidentally executed. The map structure of the existing map axes determines the specifics of the projection. If h is the handle of the map axes, then all the children of h are projected. Do not attempt this if any children of h have already been projected!
project(h,'xy') specifies that the XData of the unprojected objects corresponds to longitudes and the YData to latitudes. This is the default assumption.
project(h,'yx') specifies that the XData of the unprojected objects corresponds to latitudes and the YData to longitudes.
Create an axes, plot a line, then project it:
axesm('bonne','AngleUnits','radians');framem;
h = plot([-1 -.5 0 .5 1],[-1 -.5 0 .5 1]);

project(h)

The line is straight in x-y space, but when converted to a projected map object, it bends with the projection.
linem, patchm, surfacem, textm
![]() | previewmap | projfwd | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |