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

Skip to content

Move and clean some pylab examples #8813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor moved example fixes
  • Loading branch information
dstansby committed Jul 23, 2017
commit d690448f50848e374cc0c99a9631f908aa1bd61e
2 changes: 1 addition & 1 deletion examples/subplots_axes_and_figures/axes_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# create some data to use for the plot
dt = 0.001
t = np.arange(0.0, 10.0, dt)
r = np.exp(-t[:1000] / 0.05) # impulse response
r = np.exp(-t[:1000] / 0.05) # impulse response
x = np.random.randn(len(t))
s = np.convolve(x, r)[:len(x)] * dt # colored noise

Expand Down
8 changes: 3 additions & 5 deletions examples/subplots_axes_and_figures/axhspan_demo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
============
Axhspan Demo
axhspan Demo
============

Create lines or rectangles that span the axes in either the horizontal or
Expand All @@ -22,12 +22,10 @@
# Draw a default vline at x=1 that spans the yrange
plt.axvline(x=1)

# Draw a thick blue vline at x=0 that spans the upper quadrant of
# the yrange
# Draw a thick blue vline at x=0 that spans the upper quadrant of the yrange
plt.axvline(x=0, ymin=0.75, linewidth=8, color='#1f77b4')

# Draw a default hline at y=.5 that spans the middle half of
# the axes
# Draw a default hline at y=.5 that spans the middle half of the axes
plt.axhline(y=.5, xmin=0.25, xmax=0.75)

plt.axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
Expand Down
1 change: 0 additions & 1 deletion examples/text_labels_and_annotations/fancyarrow_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def to_texstring(s):

ax.annotate(to_texstring(stylename), (x, y),
(x - 1.2, y),
# xycoords="figure fraction", textcoords="figure fraction",
ha="right", va="center",
size=fontsize,
arrowprops=dict(arrowstyle=stylename,
Expand Down