Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
pythonspot-zh
提交
9024dd50
P
pythonspot-zh
项目概览
OpenDocCN
/
pythonspot-zh
8 个月 前同步成功
通知
0
Star
46
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pythonspot-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9024dd50
编写于
11月 19, 2019
作者:
W
wizardforcel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2019-11-19 18:08:59
上级
6e05569d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
29 addition
and
28 deletion
+29
-28
docs/81.md
docs/81.md
+4
-4
docs/82.md
docs/82.md
+2
-2
docs/83.md
docs/83.md
+4
-4
docs/84.md
docs/84.md
+2
-2
docs/85.md
docs/85.md
+6
-6
docs/86.md
docs/86.md
+4
-3
docs/88.md
docs/88.md
+1
-1
docs/89.md
docs/89.md
+5
-5
docs/90.md
docs/90.md
+1
-1
未找到文件。
docs/81.md
浏览文件 @
9024dd50
...
...
@@ -26,7 +26,7 @@ show()
![
python_matplotlib_linechart
](
img/08bb4546f3444dd75f3a9fd52f0a3b34.jpg
)
Python
[
**Matplotlib**
](
https://pythonspot.com/matplotlib/
)
Line Chart
Python
[
**Matplotlib**
](
https://pythonspot.com/matplotlib/
)
折线图
这些行:
...
...
@@ -92,7 +92,7 @@ t = arange(0.0, 20.0, 1)
![
python_line_chart
](
img/dfd62755502ca81aebecea9632e215b4.jpg
)
Python Line Chart from List
来自列表的 Python 折线图
## 多个图
...
...
@@ -120,7 +120,7 @@ show()
![
python_line_chart_multiple
](
img/41f0697b9c4ebb9f885ccb0b62b70abc.jpg
)
python
line chart multiple
python
多个折线图
如果要在同一窗口中的不同视图中绘制它们,可以使用以下方法:
...
...
@@ -152,7 +152,7 @@ plt.show()
![
Python subplots
](
img/5e6dbbe03affb0bf5a05415f48a771ad.jpg
)
Python
subplots
Python
子图
这里的 plt.subplot()语句是关键。 subplot()命令指定数字,数字和数字。
...
...
docs/82.md
浏览文件 @
9024dd50
...
...
@@ -24,7 +24,7 @@ plt.show()
![
minimal_hist
](
img/823633047587a7e6edb407963de58da0.jpg
)
Python
histogram
Python
直方图
## 完整的 matplotlib 直方图
...
...
@@ -63,6 +63,6 @@ plt.show()
![
python_histogram
](
img/e4dfab9c6e230bb2f91a6b0715c548d7.jpg
)
python_histogram
Python 直方图
[
下载示例
](
https://pythonspot.com/download-matplotlib-examples/
)
\ No newline at end of file
docs/83.md
浏览文件 @
9024dd50
...
...
@@ -6,7 +6,7 @@
## 条形图代码
The code below creates a bar chart:
下面的代码创建一个条形图:
```
py
import
matplotlib.pyplot
as
plt
;
plt
.
rcdefaults
()
...
...
@@ -30,7 +30,7 @@ plt.show()
![
figure_barchart
](
img/91f2efcb7aedc6b7c1fb02870373fc54.jpg
)
Python
Bar Chart
Python
条形图
[
Matplotlib
](
https://pythonspot.com/matplotlib/
)
图表可以是水平的,以创建水平条形图:
...
...
@@ -56,7 +56,7 @@ plt.show()
![
Bar chart horizontal
](
img/b76892fe0218d67c9bf34e469d9dc0a4.jpg
)
Bar chart horizontal
水平条形图
## 有关条形图的更多信息
...
...
@@ -102,6 +102,6 @@ plt.show()
![
barchart_python
](
img/b59cd2b0d0a998425f408fe5543c9e37.jpg
)
Python
Bar Chart comparison
Python
条形图比较
[
下载所有 Matplotlib 示例
](
https://pythonspot.com/download-matplotlib-examples/
)
\ No newline at end of file
docs/84.md
浏览文件 @
9024dd50
...
...
@@ -30,7 +30,7 @@ plt.show()
![
pie chart python
](
img/8a804a5303e6f2a4f62d47582241129b.jpg
)
p
ie chart python
p
ython 饼图
要添加图例,请使用 plt.legend()函数:
...
...
@@ -52,6 +52,6 @@ plt.show()
![
python pie chart
](
img/9036abd8c344a4a541cfb80139d9e0d3.jpg
)
python
pie chart
python
饼图
[
下载所有 Matplotlib 示例
](
https://pythonspot.com/download-matplotlib-examples/
)
\ No newline at end of file
docs/85.md
浏览文件 @
9024dd50
...
...
@@ -30,7 +30,7 @@ plt.show()
![
matplot-legend
](
img/a08ca500d9d2d3de81de36faa715c9a4.jpg
)
[
Matplotlib
](
https://pythonspot.com/matplotlib/
)
legend inside
[
Matplotlib
](
https://pythonspot.com/matplotlib/
)
内部图例
## Matplotlib 底部图例
...
...
@@ -66,7 +66,7 @@ plt.show()
![
matplot-legend-bottom
](
img/eb28ce9a1b0629a41bede0d2fb88d1a2.jpg
)
Legend placed on bottom
放在底部的图例
## Matplotlib 顶部图例
...
...
@@ -78,7 +78,7 @@ ax.legend(loc='upper center', bbox_to_anchor=(0.5, 1.00), shadow=True, nco
```
码:
代
码:
```
py
...
...
@@ -100,7 +100,7 @@ plt.show()
![
matplotlib-legend-top
](
img/2e9237024699bc650a584770b2742961.jpg
)
Legend on top
顶部图例
## 外部右侧图例
...
...
@@ -114,7 +114,7 @@ ax.legend(loc='upper center', bbox_to_anchor=(1.45, 0.8), shadow=True, ncol=1)
```
码:
代
码:
```
py
...
...
@@ -138,6 +138,6 @@ plt.show()
![
matplotlib-legend-outside
](
img/c42c47fbf14b6aaa7f986d9a92760b12.jpg
)
[
Matplotlib
](
https://pythonspot.com/matplotlib/
)
legend outside
[
Matplotlib
](
https://pythonspot.com/matplotlib/
)
外部图例
[
下载示例
](
https://pythonspot.com/download-matplotlib-examples/
)
\ No newline at end of file
docs/86.md
浏览文件 @
9024dd50
...
...
@@ -4,8 +4,9 @@
## 保存图形
[
Matplotlib
](
https://pythonspot.com/matplotlib/
)
can save plots directly to a file using savefig().
The method can be used like this:
[
Matplotlib
](
https://pythonspot.com/matplotlib/
)
可以使用
`savefig()`
将图直接保存到文件中。
该方法可以像这样使用:
```
py
...
...
@@ -54,6 +55,6 @@ display plot.png
![
matplotlib-plot-save
](
img/fc1e1a56cd0872dc8e3ed3e671b21bfb.jpg
)
A plot saved to a pdf
保存到 pdf 的图
[
下载示例
](
https://pythonspot.com/download-matplotlib-examples/
)
\ No newline at end of file
docs/88.md
浏览文件 @
9024dd50
...
...
@@ -28,7 +28,7 @@ plt.show()
```
[
<picture><source srcset="/wp-content/uploads/2016/07/matplotilb-time-1.png.webp" type="image/webp"> <source srcset="/wp-content/uploads/2016/07/matplotilb-time-1.png" type="image/jpeg"> ![matplotilb-time
](
img/35ae64518583e605bb57af58666ccecd.jpg
)
<
/picture
>
](/wp-content/uploads/2016/07/matplotilb-time-1.pn
g)
![
matplotilb-time
](
img/35ae64518583e605bb57af58666ccecd.jp
g
)
如果要更改间隔,请使用以下几行之一:
...
...
docs/89.md
浏览文件 @
9024dd50
...
...
@@ -8,7 +8,7 @@
## 匹配函数
The match function is defined as:
匹配函数定义为:
```
py
re
.
match
(
pattern
,
string
)
...
...
@@ -42,7 +42,7 @@ else:
## 电子邮件验证正则表达式
We can use the same function to validate _email address_. The grammar rules are seen in re.compile and in the grammar table.
我们可以使用相同的函数来验证电子邮件地址。 语法规则在
`re.compile`
和语法表中可见。
| 串 | 比赛 |
| --- | --- |
...
...
@@ -73,7 +73,7 @@ else:
## 搜索函数
The search function is defined as:
搜索函数定义为:
```
py
re
.
search
(
pattern
,
string
)
...
...
@@ -106,11 +106,11 @@ else:
## 正则表达式示例
A few examples of regular expressions:
正则表达式的一些示例:
## 正则表达式语法
Overview of the regex grammar:
正则表达式语法概述:
| 例 | 正则表达式 |
| --- | --- |
...
...
docs/90.md
浏览文件 @
9024dd50
...
...
@@ -14,7 +14,7 @@ sudo apt-get update
sudo
apt
-
get
install
python
-
qutip
```
We then start Python from the command line and type the commands listed below ( >>> ).
然后,我们从命令行启动 Python 并键入下面列出的命令(
`>>>`
)。
```
py
$
python
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录