Skip to main content

A package for reading gpx files and make some simple plots

Project description

gpxplotter is a Python package for reading .gpx [1] files and make some simple plots. It uses matplotlib to create some simple predefined plots and mplleaflet for making maps.

Examples

Simple example for plotting an elevation profile with heart rate

from gpxplotter import read_gpx_file
from gpxplotter.mplplotting import plot_elevation_hr_multi_dist, save_fig
from matplotlib import pyplot as plt
plt.style.use('seaborn-poster')


for track in read_gpx_file('test.gpx'):
    for i, segment in enumerate(track['segments']):
        fig = plot_elevation_hr_multi_dist(track, segment)
        save_fig(fig, 'test-{}.png'.format(i))
Example output

Simple example for showing a track in a map, colored by heart rate

from gpxplotter import read_gpx_file
from gpxplotter.mplplotting import plot_map, save_map


for track in read_gpx_file('test.gpx'):
    for i, segment in enumerate(track['segments']):
        fig = plot_map(track, segment, zcolor='pulse')
        save_map(fig, 'test-{}.html'.format(i))
Example output

Installation

gpxplot can be installed via pip:

pip install gpxplot

Note

The intended usage is for displaying heart rate information together with other information. If the gpx file does not comtain heart rate information, the source code will have to be modified accordingly.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpxplotter-0.0.1.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

gpxplotter-0.0.1-py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page