1. Plotly is introduced



Plotly is a well-known and powerful open source data visualization framework that builds interactive charts to display information in browser-based form. Plotly can create dozens of beautiful charts and maps.

Next, we use Jupyter Notebook as a development tool for data analysis. Matplotlib has drawbacks that limit Python’s use in data visualization, such as being unattractive, static, and hard to share. To solve this problem, Plotly, a new open source module for dynamic visualization, was created.

Because Plotly is dynamic, beautiful, easy to use, variety and other features.



Plotly is a top-level way of plotting when Python charts.



2. Plotly can be plotted in either of two ways

Plotly is a mapping system that integrates a variety of mapping methods, including online drawing by menu and offline drawing by code. If you use plotly online, you need to register a personal account and set a personal password on the plotly website.



Online: Save your visualizations to a web site for easy sharing and saving.

Offline: Directly generate visual images locally for easy use. (Offline mode is recommended for easy viewing and reading)



The following is an analysis of plotly’s plotting principle and method from the perspective of Python:



3. Plotly drawing



Basic charts: 20 kinds

Chart of statistics and Shipping modes: 12

Scientific charts: 21

Financial chart: 2 kinds

Maps: 8 kinds

3D charts: 19 kinds

Report generation: 4 kinds

Database connection: 7 types

Fitting tools: 3 kinds

Flow charts: 4 kinds

JavaScript add custom controls: 13 kinds







4. The first Python Plotly, to get you started



import matplotlib.pyplot as plt

%matplotlib inline

import plotly

import plotly.graph_objs as go

from plotly.offline import init_notebook_mode,iplot

init_notebook_mode(connected=True)

import warnings

warnings.filterwarnings(‘ignore’)

import numpy as np

import pandas as pd

plotly.__version__





So let’s draw a Plotly program and see what happens





X = [1, 2, 3, 4]

Y =,15,13,17 [10]

trace0 = go.Scatter(

x = x,

y = y

)

print(trace0)



data = [trace0]

print(data)



iplot(data)





I have created a tutorial on Python data visualization, which focuses on using Plotly to dynamically analyze data. For further data analysis, please refer to this tutorial:



Python Data Visualization advanced:



1. Data Visualization for Python: Dynamic Visualization based on Plotly

edu.51cto.com/sd/4bff8



2. Seaborn data Visualization for Python



edu.51cto.com/sd/19627





3. Data Visualization for Python: Dynamic Visualization based on Plotly

Edu.csdn.net/course/deta…



4. Python Data Visualization tutorial Seaborn



Edu.csdn.net/course/deta…





Welcome to pay attention to, exchange and discussion together!



The main features of the Plotly course are as follows:



Actual project content: Titanic data, iris data, flight data, financial data



This course is designed to help you learn how to manipulate data for Pandas



Plotly is a Python data visualization library.





Some of the graphs for using Python Plotly are as follows:































———————

The original:Blog.csdn.net/shenfuli/ar…

For more Python learning materials, see itheimaGZ