I have a dataset containing UAV data. I want to create a graph showing the altitude of the drone and the flight phase. On that graph I want to label the phases of flight (so take off, cruising, landing, etc). I can easily make the graph showing altitude, but I have no idea how to add in the flight phases. Could anyone help? I would like the flight phase to be visible on the altitude line graph. This could be either through colour coding, or through labels which signify when the flight phase starts/changes.
My data looks something like this (edited to add more data for clarification):
| time (s) | phase | altitude |
|---|---|---|
| 1 | take off | 10 |
| 2 | take off | 20 |
| 50 | cruise | 500 |
| 51 | cruise | 500 |
| 200 | landing | 20 |
| 201 | landing | 10 |
| 202 | take off | 10 |
| 203 | take off | 20 |
| 250 | cruise | 500 |
| 251 | cruise | 500 |
| 300 | landing | 20 |
| 301 | landing | 10 |
If you have data like this:
Output:
You can try this:
Output: