-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
executable file
·40 lines (32 loc) · 828 Bytes
/
plot.py
File metadata and controls
executable file
·40 lines (32 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# FileName: plot.py
#
# Description:
#
# Version: 1.0
# Created: 2018-06-06 15:43:52
# Last Modified: 2018-06-26 16:01:47
# Revision: none
# Compiler: gcc
#
# Author: zt ()
# Organization:
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Circle
fig = plt.figure(figsize=(4, 4))
ax = fig.add_subplot(111)
plt.xlim((-12, 12))
plt.ylim((-12, 12))
ax.spines['top'].set_color('none')
ax.spines['right'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.spines['bottom'].set_position(('data', 0))
ax.yaxis.set_ticks_position('left')
ax.spines['left'].set_position(('data', 0))
theta = np.arange(0, 2 * np.pi, 2 * np.pi / 100)
x = np.cos(theta)
y = np.sin(theta)
ax.plot(x, y)
plt.show()