IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> Python知识库 -> Data Visualization Libraries in Python -> 正文阅读

[Python知识库]Data Visualization Libraries in Python

For a Python data researcher, it turns?out to be vital to learn data visualization libraries alongside the data science libraries. Here in this article, we will detail the best and broadly utilized Python data visualization libraries.

With the assistance of?data visualization using python?libraries, we can plot various kinds of charts to address data so everybody could comprehend the conduct of the data factors. Here is a brief glance into the 7 best Python data visualization libraries that we will cover in this article:

Matplotlib

Matplotlib is the most well-known and generally utilized python data visualization library and this would be your first data visualization library that you will learn with chipping away at data science with the Python programming language. Additionally, it is viable with Python data science libraries, as NumPy, learn, and pandas.

Strangely, Matplotlib was the principal Python data visualization library, and numerous different libraries are based on top of it. Besides, libraries like Seaborn and pandas utilize a portion of their strategies.

With Matplotlib, we can make intelligent 2D charts, including line diagrams, dissipate diagrams, structured presentations, and hist charts. In spite of the fact that Matplotlib doesn’t give inbuilt help for 3D charts, it gives an extra tool compartment — mplot3d — to plot 3D diagrams.

Beginning with Matplotlib

Matplotlib is an open-source outsider Python library, so we first need to introduce it prior to utilizing it.

pip install matplotlib

Example

>>> import matplotlib.pyplot as plt
>>> x = [1,2,3,4,5]
>>> y = [1,4,9,16,25]
>>> plt.plot(x,y)
[<matplotlib.lines.Line2D object at 0x019F5D00>]
>>> plt.xlabel = "X axis"
>>> plt.ylabel = "Y axis"
>>> plt.show()

Plotly

It is an incredible and strong python data visualization library fit for plotting basic and complex diagrams. Utilizing this library, we can plot around 40 unique kinds of charts, including 2D and 3D.

Plotly is based on the highest point of the well-known JavaScript library ploty.js, and it permits python designers to plot straightforward and intelligent charts on the internet browser. We can utilize this library to show charts on Jupyter Notebook and save those diagrams as independent HTML documents.

Starting with Plotly

Plotly is an open-source python library. Use the pip install command to install it.

Example

>>> import plotly.graph_objects as go
>>> fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
>>> fig.show()

Bokeh

Like Plotly, Bokeh is another amazing Python data visualization library for current internet browsers. It is local to the Python programming language, and that is the reason numerous Python designers lean toward utilizing bokeh over Plotly.

Like plotly, we can acquire Bokeh plotted charts in HTML design. Bokeh is additionally entirely viable with famous python web systems, like Django and Flask, and we can install bokeh in Django and Flask web applications.

Starting with Bokeh

To use Bokeh, we first need to install it using the pip install command.

pip install bokeh

Example

>>> from bokeh.plotting import figure, show
>>> plot = figure(plot_width = 500, plot_height = 500)
>>> x = [10, 20, 30, 40]
>>> y= [100, 400, 900, 600]
>>> plot.circle(x,y)
>>> show(plot)

Ggplot

Python ggplot is a plotting library that depends on the R programming ggplot2 library. In ggplot, gg represents Grammar of graphs, and planning diagrams utilizing ggplot is like composing sentences in English. It is likewise entirely viable with the python pandas library and can plot diagrams utilizing DataFrames and Series.

Starting with ggplot

ggplot is an open-source library, so we can easily install it for our python environment using the pip install command.

pip install ggplot

Example

from ggplot import *
ggplot(aes(x='year', y='price'), data=price) +\
    geom_line() +\
    stat_smooth(colour='red', span=0.2)

Pygal

The data visualization library is utilized to plot straightforward diagrams on web applications. One can utilize this library with well-known python web systems, similar to Flask and Django, and plot dynamic and intuitive diagrams on the site page.

Pygal is fit for plotting various outlines, including line, bar, histogram, XY, pie, radar, box, and speck. Likewise, we can yield its diagram and charts in various configurations, including SVG, PNG, and Etree. The Python data visualization library is strongly suggested for little web applications that require basic and quick charts.

Starting with pygal

Install the pygal library using the pip command.

pip install pygal

Example

>>> import pygal
>>> line_chart = pygal.Line()
>>> line_chart.x_labels = map(str, range(2008, 2020))
>>> line_chart.add(Price,  [190, 200, 210, 215, 216, 220,  220,  221, 222, 230, 250])
<pygal.graph.line.Line object at 0x0035AF88>
>>> line_chart.render()

Folium?

The Folium library is based on top of the JavaScript leaflet.js library. Regularly in data science, we work on projects where we need to imagine data on a guide. In such a situation, we can't depend on libraries like Matplotlib or seaborn.?

Here, we use libraries like Folium. The data visualization library is frequently utilized by data researchers during data cleaning of a guide. With the assistance of Folium, we can control map data and picture it in a hurry.?

Folium accompanies many underlying test sets for various guides, including OpenStreetMap, MapQuest open, Mapbox, and Stamen. Likewise, Folium upholds data in JSON arrangement and dilemmas that data to give visualization over a guide.

Conclusion

With this, we finish up our article on the best Python data visualization libraries. Data visualization is an unquestionable requirement to have the expertise of a Python data researcher. All the Python libraries that we have recorded here are the most famous ones and are positioned by their ubiquity and utilizations.

  Python知识库 最新文章
Python中String模块
【Python】 14-CVS文件操作
python的panda库读写文件
使用Nordic的nrf52840实现蓝牙DFU过程
【Python学习记录】numpy数组用法整理
Python学习笔记
python字符串和列表
python如何从txt文件中解析出有效的数据
Python编程从入门到实践自学/3.1-3.2
python变量
上一篇文章      下一篇文章      查看所有文章
加:2021-10-06 12:11:29  更:2021-10-06 12:12:43 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/15 17:36:39-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码