I am importing a plotting package in my file like this:
import matplotlib.pyplot as plt
and am using this import later on in my code successfully(!)
fig = plt.figure(figsize=(16,10))
However, Eclipse is telling me this:
“Unused import: plt Found at: matplotlib.pyplot”
There might be a very simple solution for this, but I could not find it on the internet. I am new to Eclipse and PyDev, but there should be some way so that Eclipse recognized pyplot as plt?
I feel embarrassed. The comments from Ignacio and Bakurio already pointed at the right direction. In fact, next to
I am also importing
These imports interfere with one another, since pylab is also importing pyplot. Remove the latter import results in no warning messages anymore in Eclipse. Next time I’ll paste the full source code.