Introduction¶
plotly_extend_wrapper is a wrapper library designed to simplify data visualization using Plotly. It provides an intuitive interface for creating complex plots with simple function calls.
Overview¶
The library offers various plotting functions and utilities to streamline the creation of common visualization types:
Plotting Functions¶
Plot_pie(): Create pie charts from DataFrame columnsPlot_sunburst(): Generate hierarchical sunburst chartsPlot_bubble_chart: Create bubble charts with customizable size mappingPlot_line(): Draw line plots with support for secondary y-axisPlot_bubble_chart_with_line(): Combine bubble charts with trend linesPlot_surface(): Generate 3D surface plots with optional smoothing
Utility Functions¶
Update_plotly_object: Customize plot properties after creationcheck_directory(): Manage file paths and directory creation
Quick Start¶
Here’s a simple example to get you started:
import pandas as pd
from plotly_extend_wrapper import Plot_pie, Plot_line
# Create a pie chart
df = pd.DataFrame({'category': ['A', 'B', 'A', 'C', 'B']})
pie_chart = Plot_pie(df, 'category')
# Create a line plot with secondary y-axis
df = pd.DataFrame({
'date': pd.date_range('2023-01-01', '2023-12-31', freq='D'),
'value1': range(365),
'value2': range(0, 730, 2)
})
line_plot = Plot_line(
df,
x='date',
y=['value1'],
secondary_y=['value2'],
xtitle='Date',
ytitle='Primary Axis',
secondary_ytitle='Secondary Axis'
)
For detailed documentation on each function and its parameters, please refer to the respective sections in this documentation.