Dav Exp8 56
Dav Exp8 56
Dav Exp8 56
1. Matplotlib:
Description: Matplotlib is a comprehensive library for creating static, animated, and interactive
visualizations in Python. It provides a MATLAB-like interface for creating a wide range of plots.
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Simple Plot')
plt.show()
2. Seaborn:
Description: Seaborn is built on top of Matplotlib and provides a high-level interface for creating
attractive statistical graphics. It simplifies the process of visualizing complex relationships in data.
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.show()
3. Plotly:
Description: Plotly is a versatile library for creating interactive and publication-quality plots. It
supports a wide range of chart types and can be used to build interactive dashboards.
import plotly.graph_objects as go
# Scatter plot
fig = go.Figure(data=go.Scatter(x=[1, 2, 3, 4], y=[1, 4, 9, 16]))
fig.show()
4. Bokeh:
Description: Bokeh is designed for creating interactive, web-ready plots. It provides tools for building
interactive apps and dashboards with complex visualizations.
# Line plot
show(p)
5. ggplot (ggpy):
Description: ggplot is a Python implementation of the popular ggplot2 library in R. It follows the
Grammar of Graphics principles, making it easy to create complex visualizations.
# Scatter plot
print(p)
6. Altair:
Description: Altair is a declarative statistical visualization library based on the Vega and Vega-Lite
visualization grammars. It allows for concise and expressive visualization code.
import pandas as pd
# Scatter plot
chart.show()
7. Plotnine:
Description: Plotnine is another Python implementation of ggplot2, focusing on creating grammar of
graphics-style plots. It provides a high-level API for creating complex visualizations.
# Scatter plot
print(p)
8. Pygal:
Description: Pygal is a Python library for creating SVG (Scalable Vector Graphics) plots. It's simple
to use and produces attractive vector-based graphics suitable for web applications.
import pygal
# Line plot
line_chart = pygal.Line()
line_chart.render_in_browser()
R
# Sample data
geom_point() +
geom_line()
Histogram:
geom_histogram()
Bar Chart:
geom_bar(stat = “identity")
4. Other Libraries
Lattice: Offers high-level trellis graphics for visualizing complex data relationships.
highcharter: Creates interactive charts based on the popular Highcharts library.
Leaflet: Useful for creating interactive maps.