HardyHu
  • Home
  • Archives
  • Categories
  • Tags
  • About

Drawing 3D charts and statistical maps

1. Drawing 3D charts using mplot3d1.1 Mplot3d overview1234567import matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dfig = plt.figure()ax = Axes3D(fig)plt.show() 123456import matplotlib
2022-03-27
#Matplotlib

Jupyter Notebook Autocompletion & Code Formatting

1. Install the extension nbextensions Install: pip install jupyter_contrib_nbextensions -i https://pypi.mirrors.ustc.edu.cn/simple Activation: jupyter contrib nbextension install --user nbextensio
2022-03-25
#Jupyter

Axis customization

1. Axis overview1234import matplotlib.pyplot as pltcur_ax = plt.gca()print(cur_ax.spines) Note: Does not display properly 2. Add an axis to any location12345678910import matplotlib.pyplot as plt# plt.
2022-03-25
#Matplotlib

Sub-graphs and sharing of coordinate axes

1. Draw subgraphs of fixed areas 1.1 Draw single subgraphUsing the subplot() function of the pyplot module, you can draw a single subgraph in a planned area. 1234567891011import matplotlib.pyplot as p
2022-03-17
#Matplotlib

Beautification of chart style

1. Overview of chart styles1.1 Default chart styles123import matplotlibprint(matplotlib.rc_params()) Common configuration items Configuration items Instructions The default value lines.color Li
2022-03-17
#Matplotlib

Classifying with k-Nearest Neighbors

1. Classifying with distance measurementsk-Nearest Neighbors (kNN) is one of the simplest yet most effective machine learning algorithms used for classification and regression tasks. As a non-parametr
2022-03-14
#kNN #python

Customization of chart auxiliary elements

1. The auxiliary elements commonly used in chartsCommon auxiliary elements include following: Coordinate axis: The single coordinate axis can be divided into horizontal coordinate axis (X axis) and v
2022-03-14
#Matplotlib

The PyCharm run button is moved from left to right

Forewordpycharm’s start button is on the left, you want to move it to the right Step View -> Appearance -> Toolbar
2022-03-14
#PyCharm

Use Matplotlib to draw simple charts

1. Draw line chart12345678910import matplotlib.pyplot as pltimport numpy as npx1 = np.arange(1, 10)y1 = x1y2 = x1 ** 2plt.plot(x1, y1)plt.plot(x1, y2)plt.show() 1234567import matplotlib.pyplot as pl
2022-03-11
#Matplotlib

Python What Does ‘u', 'r', 'b' Mean in Front of a String

1. ‘u’ means UnicodeThe ‘u’ in front of a string means the string is a Unicode string. 12hello_rus = u"Привет, мир"hello_rus In Python 2.x, a Unicode string is marked with ‘u’. However, in P
2022-02-25
#Python
1…1516171819…22

Search

Hexo Fluid
总访问量 次 总访客数 人
浙ICP备2025160052号