# Diagram the Elevation Profile of the Mariana Trench

Get the position of the Mariana Trench.

 In[1]:= Xposition = Entity["UnderseaFeature", "MarianaTrench"]["Position"]
 Out[1]=

Plot a north-south section of the trench.

 In[2]:= XnsPositions = GeoDestination[position, GeoDisplacement[{Quantity[10*#, "Kilometers"], Quantity[180, "AngularDegrees"]}]] & /@ Range[-25, 25];
 In[3]:= XnsData = Transpose[ List[(#[[1, 1]] - position[[1, 1]]) & /@ nsPositions, First@GeoElevationData[GeoPosition[First /@ nsPositions]]]];
 In[4]:= Xlpns = Rotate[ ListPlot[{-#[[1]], #[[2]]} & /@ nsData, Frame -> True, Axes -> False, AspectRatio -> 1/5, FrameTicks -> False, Joined -> True, PlotRangePadding -> {None, Automatic}], -90 Degree]
 Out[4]=

Plot an east-west section of the trench.

 In[5]:= XwePositions = GeoDestination[position, GeoDisplacement[{Quantity[10*#, "Kilometers"], Quantity[90, "AngularDegrees"]}]] & /@ Range[-25, 25];
 In[6]:= XweData = Transpose[ List[(#[[1, 2]] - position[[1, 2]]) & /@ wePositions, First@GeoElevationData[GeoPosition[First /@ wePositions]]]];
 In[7]:= Xlpwe = ListPlot[weData, Frame -> True, Axes -> False, AspectRatio -> 1/5, FrameTicks -> False, Joined -> True, PlotRangePadding -> {None, Automatic}]
 Out[7]=

Make a relief map of the trench and mark the sections.

 In[8]:= Xrelief = GeoGraphics[{Thick, GrayLevel[0.5], Line[nsPositions], Line[wePositions], GeoMarker[position, Style["\[Times]", Red, 30]]}, GeoRangePadding -> None, GeoBackground -> GeoStyling["ReliefMap"]]
 Out[8]=

Combine the map and section plots.

 In[9]:= XGrid[{{lpwe}, {relief, lpns}}]
 Out[9]=

## Mathematica + Mathematica Online

Questions? Comments? Contact a Wolfram expert »