Revision: 8440
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8440&view=rev
Author: jdh2358
Date: 2010-06-17 17:45:38 +0000 (Thu, 17 Jun 2010)
Log Message:
-----------
add np and plt to default plot namespace in plot directive
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Modified: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2010-06-16
17:08:43 UTC (rev 8439)
+++ trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2010-06-17
17:45:38 UTC (rev 8440)
@@ -194,7 +194,8 @@
# it can get at its data files, if any. Add its path to sys.path
# so it can import any helper modules sitting beside it.
if plot_code is not None:
- exec(plot_code)
+ exec_code = 'import numpy as np; import matplotlib.pyplot as
plt\n%s'%plot_code
+ exec(exec_code)
else:
pwd = os.getcwd()
path, fname = os.path.split(plot_path)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins