thiagoralves / OpenPLC_Editor

OpenPLC Editor - IDE capable of creating programs for the OpenPLC Runtime
GNU General Public License v2.0
387 stars 191 forks source link

Ugly FIX of Matplotlib private function import #63

Closed petrkr closed 1 year ago

petrkr commented 1 year ago

Since matplotlib changed private functions (that is why never use shortcuts like that). We have to change to new function. It is still ugly fix as it can change in next version again. But atleast it will start up now... Better will be use public functions/classes. But unfortunately I do not understand whole concept, so I can not do better than this for now.

Fixes #62

thiagoralves commented 1 year ago

Thanks for the fix. I'm not 100% sure what this code does either, but it seems that it is a helper to convert the variables plot to an image. This is not public on the matplotlib library, and I agree it is bad to use it that way. I don't know if there is an equivalent public method that does something similar on matplotlib, but my feeling is that the original devs just used it because it was easier to get the lib private helper than to develop the thing from scratch. Perhaps the best approach would be to write a method that does the conversion, if such thing is not available on another lib or on a public call from matplotlib.