code: def altitude_profile(data):
      plot = Plot(width=800, height=400)
      plot.title.text = "%s - Altitude Profile" % name
      plot.y_range.range_padding = 0
  
      xaxis = LinearAxis(axis_label="Distance (km)")
      plot.add_layout(xaxis, "below")
  
      yaxis = LinearAxis(axis_label="Altitude (m)")
      plot.add_layout(yaxis, "left")
  
      plot.add_layout(Grid(dimension=0, ticker=xaxis.ticker))  # x grid
      plot.add_layout(Grid(dimension=1, ticker=yaxis.ticker))  # y grid
  
      plot.add_tools(PanTool(), WheelZoomTool(), ResetTool())
  
      X, Y = data.dist, data.alt
      y0 = min(Y)
  
      patches_source = ColumnDataSource(
          dict(
              xs=[
                  [X[i], X[i + 1], X[i + 1], X[i]]
                  for i in range(len(X[:-1]))
              ],
              ys=[[y0, y0, Y[i + 1], Y[i]] for i in range(len(Y[:-1]))],
              color=data.colors[:-1],
          )
      )
      patches = Patches(
          xs="xs", ys="ys", fill_color="color", line_color="color"
      )
      plot.add_glyph(patches_source, patches)
  
      line_source = ColumnDataSource(dict(x=data.dist, y=data.alt))
      line = Line(x="x", y="y", line_color="black", line_width=1)
      plot.add_glyph(line_source, line)
  
      return plot
  
file_path: bokeh/examples/models/trail.py
imports: from math import atan2, cos, radians, sin, sqrt
  import numpy
  import scipy.ndimage
  from bokeh.document import Document
  from bokeh.embed import file_html
  from bokeh.models import Column, ColumnDataSource, GMapOptions, GMapPlot, Grid, Label, Line, LinearAxis, PanTool, Patches, Plot, Range1d, ResetTool, WheelZoomTool
  from bokeh.sampledata.mtb import obiszow_mtb_xcm
  from bokeh.util.browser import view
label_desc: Use image node_id 5 for calling a global function with example usage: altitude_profile(data) and returns: plot