- Notifications
You must be signed in to change notification settings - Fork 908
/
Copy pathtip-dotted.py
27 lines (20 loc) · 855 Bytes
/
tip-dotted.py
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
# -----------------------------------------------------------------------------
# Matplotlib cheat sheet
# Released under the BSD License
# -----------------------------------------------------------------------------
# Scripts to generate all the basic plots
importpathlib
importnumpyasnp
importmatplotlibasmpl
importmatplotlib.pyplotasplt
ROOT_DIR=pathlib.Path(__file__).parent.parent
fig=plt.figure(figsize=(5, .25))
ax=fig.add_axes([0, 0, 1, 1], frameon=False,
xticks=[], yticks=[], xlim=[0, 1], ylim=[-.5, 1.5])
epsilon=1e-12
plt.plot([0, 1], [0, 0], "black", clip_on=False, lw=8,
ls=(.5, (epsilon, 1)), dash_capstyle="round")
plt.plot([0, 1], [1, 1], "black", clip_on=False, lw=8,
ls=(-.5, (epsilon, 2)), dash_capstyle="round")
fig.savefig(ROOT_DIR/"figures/tip-dotted.pdf")
# plt.show()