Skip to content

Instantly share code, notes, and snippets.

View TheOldMyronSiren's full-sized avatar

Siren TheOldMyronSiren

View GitHub Profile
@TheOldMyronSiren
TheOldMyronSiren / dpgDonutGraph.py
Created October 13, 2021 15:09
Wrapper for creating a donut graph to be used with DearPyGUI
import matplotlib.pyplot as plt
from matplotlib.backends.backend_agg import FigureCanvasAgg
import dearpygui.dearpygui as dpg
import numpy as np
class donutGraph():
def __init__(self,width:int=500,height:int=500,dpi:int=100,tightLayout:bool=True,pad:int=0,colors:list=None,labels:list=[],values:list=None,background:str=None,labelSize:int=14,labelColor:str="white"):
"""Creates a donut graph with matplotlib and returns it has an image for use as a texture in DearPyGUI.
Attributes: