8000 Merge pull request #4656 from ericmjl/mep12-spine-to-stem · matplotlib/matplotlib@c7ef841 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7ef841

Browse files
committed
Merge pull request #4656 from ericmjl/mep12-spine-to-stem
Mep12 spine to stem
2 parents 58064c3 + bef1bae commit c7ef841

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/pylab_examples/stackplot_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
from matplotlib import pyplot as plt
2+
import matplotlib.pyplot as plt
33

44

55
def fnx():

examples/pylab_examples/stem_plot.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/usr/bin/env python
2-
from pylab import *
1+
import matplotlib.pyplot as plt
2+
import numpy as np
33

4-
x = linspace(0.1, 2*pi, 10)
5-
markerline, stemlines, baseline = stem(x, cos(x), '-.')
6-
setp(markerline, 'markerfacecolor', 'b')
7-
setp(baseline, 'color', 'r', 'linewidth', 2)
4+
x = np.linspace(0.1, 2*np.pi, 10)
5+
markerline, stemlines, baseline = plt.stem(x, np.cos(x), '-.')
6+
plt.setp(markerline, 'markerfacecolor', 'b')
7+
plt.setp(baseline, 'color', 'r', 'linewidth', 2)
88

9-
show()
9+
plt.show()

0 commit comments

Comments
 (0)
0