0

I have a Python matplotlib script that uses basemap to draw a simple map and plot data onto it.

On Windows there are tool ikons like Home/Zoom/Save. On my Ubuntu 17.1 machine the exact same program does not show these tools.

This is what Im using:

import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import numpy as np
from Tkinter import PhotoImage

This is the code that makes the map:

plt.subplot(122)
plt.title('mapsysname')
earth = Basemap(projection='mill')
earth.drawcoastlines(color='0.50', linewidth=0.25)
earth.fillcontinents(color='0.95', zorder=0)
x, y = earth(longitudes, latitudes)
earth.scatter(x, y, color='g', marker='o', linewidths=0.5)
for i, txt in enumerate(datalogger_id):
    plt.annotate(txt, xy=(x[i], y[i]), xycoords='data', xytext=(8, -4), textcoords='offset points', wrap=True)
plt.show()

longitudes and latitudes are lists and datalogger_id is a string.

Is there some additional package needed on Linux?

Scalextrix
  • 501
  • 2
  • 10
  • 24
  • Do you have the tool icons with normal (no Basemap) plots? What [backend](https://stackoverflow.com/a/3580047/2454357) are you using on Ubuntu? – Thomas Kühn Apr 05 '18 at 11:08
  • Both my Windows and Ubuntu machines are using the same backend 'TkAgg'. I commented out the matplotlib elements, and I still dont get the ikons to show – Scalextrix Apr 06 '18 at 11:45

0 Answers0