Some Python Notes

1.) Using the ElementTree module
1.a) Flat search in the tree
Instead of hierarchically stepping down the tree, a flat search can be done by any of
    for elem in root.findall('.//'+GPX_NAMESPACE+'trkpt'):
    for elem in tree.findall('//'+GPX_NAMESPACE+'trkpt'):
1.b) Using namespaces
Instead of specifying the namespace URL explicitly, you can define and use a namespace like
    namespaces = {'gpx': 'http://www.topografix.com/GPX/1/1'}
    for trkpt in trkseg.findall('gpx:trkpt', namespaces):

2.) Matplotlib
2.a) Multiple axes
    http://matplotlib.org/examples/api/two_scales.html
    http://matplotlib.org/faq/howto_faq.html#multiple-y-axis-scales
2.b) Font setting
    http://matplotlib.org/users/customizing.html
    http://stackoverflow.com/questions/3899980/how-to-change-the-font-size-on-a-matplotlib-plot
Some Python Notes

1.) Using the ElementTree module
1.a) Flat search in the tree
Instead of hierarchically stepping down the tree, a flat search can be done by any of
    for elem in root.findall('.//'+GPX_NAMESPACE+'trkpt'):
    for elem in tree.findall('//'+GPX_NAMESPACE+'trkpt'):
1.b) Using namespaces
Instead of specifying the namespace URL explicitly, you can define and use a namespace like
    namespaces = {'gpx': 'http://www.topografix.com/GPX/1/1'}
    for trkpt in trkseg.findall('gpx:trkpt', namespaces):

2.) Matplotlib
2.a) Multiple axes
    http://matplotlib.org/examples/api/two_scales.html
    http://matplotlib.org/faq/howto_faq.html#multiple-y-axis-scales
2.b) Font setting
    http://matplotlib.org/users/customizing.html
    http://stackoverflow.com/questions/3899980/how-to-change-the-font-size-on-a-matplotlib-plot
2.c) Backend selection
    In my openSuSE installation, by default no graph is shown because the matplotlib backend is not pre-set.
    To set the backend, 
    - either insert
        mpl.use('TkAgg')
      between
        import matplotlib as mpl
      and
        import matplotlib.pyplot as plt
    - or (see http://matplotlib.org/users/customizing.html): set the backend by placing
        backend      : TkAgg
      in .config/matplotlib/matplotlibrc

Add hint how to select matplotlib backend for openSUSE
Add hint how to select matplotlib backend for openSUSE
