|
4 | 4 | gpx = ezgpx.GPX("file.gpx")
|
5 | 5 |
|
6 | 6 | # Plot with Matplotlib
|
7 |
| -gpx.matplotlib_plot(title="Track", base_color="#FF0000", |
8 |
| - start_stop=True, way_points=False, file_path="img_1") |
| 7 | +gpx.matplotlib_plot(elevation_color=True, |
| 8 | + start_stop_colors=("green", "red"), |
| 9 | + way_points_color="blue", |
| 10 | + title=gpx.name(), |
| 11 | + duration=(0, 0), |
| 12 | + distance=(0.5, 0), |
| 13 | + ascent=None, |
| 14 | + pace=(1, 0), |
| 15 | + speed=None, |
| 16 | + file_path="img_1") |
9 | 17 |
|
10 | 18 | # Plot with Matplotlib Basemap Toolkit
|
11 |
| -gpx.matplotlib_basemap_plot(title="Track", base_color="#00FF00", |
12 |
| - start_stop=False, way_points=False, file_path="img_2") |
| 19 | +gpx.matplotlib_basemap_plot(base_color="darkorange", |
| 20 | + start_stop_colors=("darkgreen", "darkred"), |
| 21 | + way_points_color="darkblue", |
| 22 | + title=gpx.name(), |
| 23 | + duration=(0,0), |
| 24 | + distance=(0.5,0), |
| 25 | + ascent=None, |
| 26 | + pace=None, |
| 27 | + speed=(1,0), |
| 28 | + file_path="img_2") |
13 | 29 |
|
14 | 30 | # Plot with gmap (Google Maps)
|
15 |
| -gpx.gmap_plot(title="Track", base_color="#0000FF", start_stop=True, |
16 |
| - way_points=True, file_path="map_1.html", open=True) |
| 31 | +gpx.gmap_plot(base_color="yellow", |
| 32 | + start_stop_colors=("green", "red"), |
| 33 | + way_points_color="blue", |
| 34 | + zoom=14, |
| 35 | + title=gpx.name(), |
| 36 | + file_path="map_1.html", |
| 37 | + open=False) |
17 | 38 |
|
18 | 39 | # Plot with Folium
|
19 |
| -gpx.folium_plot(title="Track", tiles="OpenStreetMap", base_color="#000000", start_stop=True, |
20 |
| - way_points=True, minimap=True, coord_popup=True, file_path="map_2.html", open=True) |
| 40 | +gpx.folium_plot(tiles="OpenStreetMap", |
| 41 | + base_color="orange", |
| 42 | + start_stop_colors=("green", "red"), |
| 43 | + way_points_color="blue", |
| 44 | + minimap=True, |
| 45 | + coord_popup=False, |
| 46 | + title="Very nice track!", |
| 47 | + zoom=8, |
| 48 | + file_path="map_2.html", |
| 49 | + open=True) |
21 | 50 |
|
22 | 51 | # Write new GPX file
|
23 | 52 | gpx.to_gpx("new_file.gpx")
|
0 commit comments