Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 405cbc5

Browse files
committed
Cleanup and move dash_control demo
1 parent edce62b commit 405cbc5

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Demo of a simple plot with a custom dashed line.
3+
4+
A Line object's ``set_dashes`` method allows you to specify dashes with
5+
a series of on/off lengths (in points).
6+
"""
7+
import numpy as np
8+
import matplotlib.pyplot as plt
9+
10+
11+
x = np.linspace(0, 10)
12+
line, = plt.plot(x, np.sin(x), '--', linewidth=2)
13+
14+
dashes = [10, 5, 100, 5] # 10 points on, 5 off, 100 on, 5 off
15+
line.set_dashes(dashes)
16+
17+
plt.show()

examples/pylab_examples/dash_control.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/tests/backend_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
files['lines'] = [
5555
'fill_demo.py',
5656
'fill_demo_features.py',
57+
'line_demo_dash_control.py',
5758
]
5859

5960
files['shapes'] = [
@@ -135,7 +136,6 @@
135136
'custom_figure_class.py',
136137
'custom_ticker1.py',
137138
'customize_rc.py',
138-
'dash_control.py',
139139
'dashpointlabel.py',
140140
'date_demo1.py',
141141
'date_demo2.py',

0 commit comments

Comments
 (0)