Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add a *simple* arrow example #1187

Merged
merged 2 commits into from

4 participants

@dmcdougall
Collaborator

The current arrow example is rather long. As requested in a comment in #1096, this provides a much simpler arrow example for users to look at.

@travisbot

This pull request fails (merged 6e36175 into 4c1e36d).

examples/pylab_examples/arrow_simple_demo.py
@@ -0,0 +1,6 @@
+import matplotlib.pyplot as plt
+
+fig = plt.figure()
+ax = fig.add_subplot(1, 1, 1)
@pelson Collaborator
pelson added a note

Even simpler:

ax = plt.axes()
ax.arrow(...)

?

@dmcdougall Collaborator

Ah yes. Sorry! This is debris from the object oriented interface. I'm a heavy OO user, so when I write I examples I use the OO and then convert them to pyplot when I'm done. I'll fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@travisbot

This pull request fails (merged a93a9e3 into 4c1e36d).

@mdboom mdboom merged commit 61bdcc3 into matplotlib:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 1, 2012
  1. @dmcdougall
Commits on Sep 2, 2012
  1. @dmcdougall
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 examples/pylab_examples/arrow_simple_demo.py
View
5 examples/pylab_examples/arrow_simple_demo.py
@@ -0,0 +1,5 @@
+import matplotlib.pyplot as plt
+
+ax = plt.axes()
+ax.arrow(0, 0, 0.5, 0.5, head_width=0.05, head_length=0.1, fc='k', ec='k')
+plt.show()
Something went wrong with that request. Please try again.