Saving an image without using Orca

Iā€™m generating graphs and saving them using orca. However Iā€™m having trouble getting Orca to run nicely on CentOS7 with there being no GUI, and when it does run, it seems to crash my script (a Discord bot) after successfully generating the image.

Is there any way to save an image locally without using Orca?