OnlineGDB compiles and runs the program on a remote server. It only forwards simple results to the user, including standard output and HTML.
So if you make sure that your Python plotting happens into an HTML, then (hopefully) you'll see that also in your browser.
Please, test if this works.