Okay, so I started a school project where I need to make multiple plots pop up during runtime and each requires an event handler for user input. My main machine is a Mac, and I've got it working without any issue. The problem is that my research lab also has a few linux and windows machines, and I would like to get my program working on them as well. It seems that the underlying culprit is that each operating system uses a different backend for how it plots figures in matplotlib. I'm not a CS student, and thus feel a little unsure how to fix this. Is there a standard backend that windows 10, ubuntu, Mac, etc. that I could hard code into my program to make sure my code runs correctly on all of them?
答案 0 :(得分:1)
The main idea of having backends is that you wouldn't need to care about how the plotting is performed and let the backend do everything. That said, you probably wouldn't want to hardcode any specific backend and let matplotlib decide which one to use on each machine.
You also may want to read matplotlib backends - do I care?
There might be some special issues, such that certain things don't work with certain backends, but since there is no information about that given in the question, the general tendency would be not to set any backend at all.