Thank you for sharing some more information about your use case. As far as I know, we do not have a function in our API that will automatically graph elevation data over a given polyline. However, the following demo showcases how to add a polyline to the top of a 3D Tileset.
This demo also showcases how to get the height of the polyline at various locations. In terms of visualizing the data that you will retrieve from our API, I did a little bit of research and it seems like ploty is a great graphing API.
Let me know if you have any other questions or concerns! Your project seems really cool I am looking forward to seeing your progress.