wrapper¶
Plot_pie¶
Plot_pie(data:
pd.DataFrame, target:str, **kwargs)
Make pie plot
Parameters¶
data :
pd.DataFramepandas.DataFrame included data to make pie chart
target :
strString which column you would like to use for pie chart
**kwargs : dict
Additional keyword arguments passed to
plotly.express.pie
Returns¶
plotly.graph_objects
Object of pie chart
Plot_sunburst¶
Plot_sunburst(data:
pd.DataFrame, groups:list, **kwargs)
Make sunburst plot
Parameters¶
data :
pd.DataFramepandas.DataFrame included data to make sunburst chart
groups :
listStrings list of group
Changed when you replace the order
**kwargs : dict
Additional keyword arguments passed to
plotly.express.sunburst
Returns¶
plotly.graph_objects
Object of sunburst chart
Plot_bubble_chart¶
Plot_bubble_chart(df:
pd.DataFrame, x:str, y:str, color=None, facet_col=None, facet_row=None, rounded=None, decimals=None, normalize=False, smoothing=False, offset=0, **kwargs)
Make bubble chart
Parameters¶
df :
pandas.DataFramepandas.DataFrame included data to make plot
x :
strX-axis column’s name
y :
strY-axis column’s name
color :
str, optionalColumn name you want colorize with data, by default None
facet_col :
str, optionalColumn name you want plot separated vertically, by default None
facet_row :
str, optionalColumn name you want plot separated horizontally, by default None
rounded :
list, optionalColumns list which columns you want to round data, by default None
decimals :
list, optionalDecimals list what level you want to round for each columns, by default None
normalize :
bool, optionalIf True, bubble size is calculated as normalized, by default False
smoothing :
bool, optionalIf True, bubble size were smoothed between each plot, by default False
offset :
int, optionalOffset value for bubble size, by default 0
**kwargs : dict
Additional keyword arguments passed to
plotly.express.scatter
Returns¶
plotly.graph_objects
Object of bubble chart
Plot_line¶
Plot_line(df:
pd.DataFrame, x:str, y:list, secondary_y:list, xtitle=None, ytitle=None, secondary_ytitle=None, save_html_path=None, vspan=None, vspan_color_randomize=False, sort_column=True, sort_x=True, opacity=0.2, px_kwargs=dict(), **kwargs)
Make line graph with secondary y using plotly.express
Parameters¶
df :
pd.DataFrameOriginal dataframe
x :
strX-axis column name
y :
listY-axis columns name
secondary_y :
listSecondary y-axis columns name
xtitle :
str, optionalX-axis title, by default None
ytitle :
str, optionalY-axis title, by default None
secondary_ytitle :
str, optionalSecondary y-axis title, by default None
save_html_path :
strorpathlib.Path, optionalPath to output graph as html file
vspan :
list, optionalTuple list for filling color in specify period, by default None
vspan_color_randomize :
bool, optionalIf True, choose random color, by default False
sort_column :
bool, optionalIf True, sort y column list
sort_x :
bool, optionalIf True, sort by x column
opacity :
float, optionalSame option of plotly.express.line, by default 0.2
px_kwargs :
dict, optionalKwargs dictionary used for original plotly.express.line object, by default dict()
**kwargs : dict
Additional keyword arguments for layout update
Returns¶
plotly.graph_objects
Plot graph with secondary y-axis
Plot_bubble_chart_with_line¶
Plot_bubble_chart_with_line(bubble_plot:
Figure, line_info:dict, x1:float, x2:float, xtitle=None, ytitle=None, **kwargs)
Making bubble chart with linear plot
Parameters¶
bubble_plot :
FigureBubble chart object
line_info :
dictLine dictionary with following structure:
{ "color": { "a": slope, "b": intercept } }
x1 :
floatStart x-axis value
x2 :
floatEnd x-axis value
xtitle :
str, optionalString of x-axis
ytitle :
str, optionalString of y-axis
**kwargs : dict
Additional keyword arguments for layout update
Returns¶
plotly.graph_objects
Combined figure of bubble chart and line plot
Plot_surface¶
Plot_surface(df:
pd.DataFrame, x:str, y:str, z:str, fill_value=0, smoothing=False, smooth_point_num=100, title=None, height=None, width=None, **kwargs)
Generates a 3D surface plot using Plotly
Parameters¶
df :
pd.DataFrameThe input data frame containing the data to plot
x :
strThe column name for the x-axis
y :
strThe column name for the y-axis
z :
strThe column name for the z-axis
fill_value :
int, optionalThe value to fill missing data in the pivot table, by default 0
smoothing :
bool, optionalWhether to apply smoothing to the data, by default False
smooth_point_num :
int, optionalThe number of points to use for smoothing, by default 100
title :
str, optionalThe title of the plot, by default None
height :
int, optionalThe height of the plot, by default None
width :
int, optionalThe width of the plot, by default None
**kwargs : dict
Additional keyword arguments for the plot
Returns¶
plotly.graph_objects
3D surface plot