Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does Python visual chemical industry have?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "what Python visual chemical industry has". In daily operation, I believe many people have doubts about what problems Python visual chemical industry has. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what Python visual chemical industry has". Next, please follow the editor to study!

1 、 matplotlib

Two histograms

Matplotlib is the leader of the Python visualization library. After more than a decade, it is still the most commonly used drawing library for Python users. Its design is very close to the commercial programming language MATLAB designed in the 1980s.

Because matplotlib is the first Python visual library, there are many other libraries that build on it or call it directly.

For example, pandas and Seaborn are outsourced by matplotlib, which allows you to call matplotlib methods with less code.

Although it is easy to get general information about the data with matplotlib, it is not so easy to make charts available for publication more quickly and easily.

As Chris Moffitt mentioned in the introduction to Python Visualization tools: "it's very powerful and very complex."

Matplotlib's default painting style with a strong flavor of the 1990s has also been complained about for years. The upcoming release of matplotlib 2. 0 boasts many more stylish styles.

2 、 Seaborn

Violinplot (Michael Waskom)

Seaborn takes advantage of matplotlib to make good-looking charts with concise code.

The biggest difference between Seaborn and matplotlib is that its default drawing style and color matching have modern beauty.

Since Seaborn is built on matplotlib, you need to know about matplotlib to adjust the default parameters of Seaborn.

3 、 ggplot

Small multiples (hat)

Ggplot is based on ggplot2, a mapping package of R, and takes advantage of concepts derived from Image Grammar (The Grammar of Graphics).

Ggplot differs from matplotlib in that it allows you to overlay different layers to complete a picture. For example, you can start with the axis, and then add dots, lines, trend lines, and so on.

Although "image grammar" has been praised by the mapping method of "close to the thought process", users who are used to matplotlib may need some time to adapt to this new way of thinking.

The author of ggplot mentioned that ggplot is not suitable for making very personalized images. It sacrifices image complexity for simplicity of operation.

Ggplot is very integrated with pandas, so when you use it, it's best to read your data as DataFrame.

4 、 Bokeh

Interactive weather statistics for three cities (Continuum Analytics)

Like ggplot, Bokeh is based on the concept of "graphic grammar".

But unlike ggplot, it is based entirely on Python rather than referenced from R.

Its advantage is that it can be used to make interactive charts that can be directly used in the network. Diagrams can be output as JSON objects, HTML documents, or interactive web applications.

Boken also supports data streams and real-time data. Bokeh provides three levels of control for different users.

The highest level of control is used for rapid mapping, mainly for making commonly used images, such as histograms, boxes, and histograms.

The medium level of control, like matplotlib, allows you to control the basic elements of the image (such as the points in the distribution map).

The lowest level of control is mainly for developers and software engineers.

It has no default value, and you have to define every element of the chart.

5 、 pygal

Box plot (Florian Mounier)

Pygal, like Bokeh and Plotly, provides interactive images that can be directly embedded in web browsers.

The main difference from the other two is that it can output the chart to SVG format.

If you have a relatively small amount of data, SVG is enough. But if you have hundreds of data points, the rendering of SVG will become very slow.

Since all diagrams are encapsulated into methods, and the default style is beautiful, beautiful diagrams can be easily produced with a few lines of code.

6 、 Plotly

Line plot (Plotly)

You may have heard of the online mapping tool Plotly, but did you know that you can use it through Python?

Plotly is as dedicated to interactive charts as Bokeh, but it provides several chart types that are hard to find in other libraries, such as isoline maps, tree maps, and 3D charts.

7 、 geoplotlib

Choropleth (Andrea Cuttone)

Geoplotlib is a toolkit for making maps and geo-related data.

You can use it to make a variety of maps, such as equivalent area maps, heat maps, point density maps.

You must install Pyglet (an object-oriented programming interface) to use geoplotlib. However, because most of Python's visualization tools do not provide maps, it is also convenient to have a full-time mapping tool.

8 、 Gleam

Scatter plot with trend line (David Robinson)

Gleam borrows the inspiration of Shiny from R. It allows you to use only Python programs to turn your analytics into interactive web applications. You don't need to be able to use HTML CSS or JaveScript.

Gleam can use any kind of Python visualization library.

When you create a chart, you can add a field to it so that users can use it to sort and filter the data.

9 、 missingno

Nullity matrix (Aleksey Bilogur)

The lack of data is a permanent pain.

Missingno uses images to allow you to quickly assess missing data instead of struggling with data sheets.

You can sort or filter the data according to the integrity of the data, or consider correcting the data based on the heat map or tree map.

10 、 Leather

With consistent scales (Christopher Groskopf)

The best definition of Leather comes from its author, Christopher Groskopf.

"Leather works for people who need a chart now and don't care whether the chart is perfect or not."

It can be used for all data types and then generate SVG images so that you don't lose image quality when you resize the image.

At this point, the study on "what Python visual chemical industry has" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report