simpful
simpful copied to clipboard
Plotting does not work
I tried to plot your built in plotting tools but it does not work because it says matplotlib does not exist.
Here is my error code:
Traceback (most recent call last):
File "c:\Users\zaina\OneDrive\Skoleopgaver\Robotteknologi\Bachelorprojekt\Source code\pytello\test_Arucodetector.py", line 68, in setUp
self.drone_controller.SetFuzzySystem()
File "c:\Users\zaina\OneDrive\Skoleopgaver\Robotteknologi\Bachelorprojekt\Source code\pytello\Arucodetector.py", line 78, in SetFuzzySystem
self.SetInputs()
File "c:\Users\zaina\OneDrive\Skoleopgaver\Robotteknologi\Bachelorprojekt\Source code\pytello\Arucodetector.py", line 84, in SetInputs
self.controller.produce_figure(outputfile = "x.png")
File "C:\Users\zaina\anaconda3\lib\site-packages\simpful\simpful.py", line 722, in produce_figure
raise Exception("ERROR: please, install matplotlib for plotting facilities")
Exception: ERROR: please, install matplotlib for plotting facilities
I encountered this error too. It happens because the import silently failed at the start, probably because you don't have the seaborn lib.
# simpful.py
try:
from matplotlib.pyplot import plot, show, title, subplots, legend
import seaborn as sns
matplotlib = True
except ImportError:
matplotlib = False
A simple workaround is to pip install 'seaborn' package.
I have already installed seaborn, but that didn't worked
Hi @ZA0068 ,
matplotlib is an optional import in simpful, but it is mandatory if you want to use the plotting methods.
Could you verify to have correctly installed matplotlib (and seaborn, if you like it) on your working environment via pip freeze
?
You might also try to do a clean reinstall of the matplotlib package.
I just pushed a new version 5ffb7605edccf75e1fcd45ce77972864a455e982, that makes seaborn fully optional. Matplotlib is still necessary for using the plotting facilities.
Thank you for pointing that out!
ok ill check that out