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

Skip to content

Commit 90e1f59

Browse files
committed
added documentation for usetex
added a static_figs directory for scripts that require optional features to generate images for the documentation svn path=/trunk/matplotlib/; revision=5423
1 parent b1c7187 commit 90e1f59

16 files changed

Lines changed: 236 additions & 14 deletions

File tree

doc/_static/tex_demo.png

22.3 KB
Loading

doc/_static/tex_unicode_demo.png

22.4 KB
Loading

doc/devel/outline.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ collections ? no author ?
3232
mathtext Michael ? submitted John
3333
fonts et al Michael ? no author Darren
3434
pyplot tut John submitted Eric ?
35-
usetex Darren has author ?
35+
usetex Darren submitted ?
3636
configuration Darren preliminary ?
3737
colormapping Perry ? no author Eric ?
3838
win32 install Charlie ? no author Darren
@@ -64,8 +64,7 @@ the canvas John has author ?
6464
the artist John has author ?
6565
transforms Michael submitted John
6666
documenting mpl Darren submitted ?
67-
coding guide John submitted Eric (Darren
68-
suggests)?
67+
coding guide John submitted Eric ?
6968
and_much_more ? ? ?
7069
=============================== ==================== =========== ===================
7170

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. _environment-variables:
2+
3+
*********************
4+
Environment Variables
5+
*********************
6+
7+
====================== =======================================================
8+
Environment Variable Description
9+
====================== =======================================================
10+
.. envvar:: PATH The list of directories searched to find executable
11+
programs
12+
.. envvar:: PYTHONPATH The list of directories that is searched to find Python
13+
packages and modules
14+
====================== =======================================================
15+
16+
17+
18+
19+
Setting Environment Variables
20+
=============================
21+
22+
Linux/OS-X
23+
----------
24+
25+
26+
27+
Windows
28+
-------

doc/faq/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Frequently asked questions about matplotlib
1414
installing_faq.rst
1515
troubleshooting_faq.rst
1616
howto_faq.rst
17-
17+
environment_variables_faq.rst

doc/faq/installing_faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _installing-faq:
22

3-
==================
3+
******************
44
Installation FAQ
5-
==================
5+
******************
66

77
How do I report a compilation problem?
88
======================================

doc/static_figs/README

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
Scripts that require optional system configurations to generate scripts should go here. The
2-
figures will be generated in doc/_static, and will be named based on the name of the script,
3-
so we can avoid unintentionally overwriting any existing figures. Please add a line to this
4-
file for any additional requirements necessary to generate a new figure.
1+
Scripts that require optional system configurations to generate scripts should
2+
go here. The figures will be generated in doc/_static, and will be named based
3+
on the name of the script, so we can avoid unintentionally overwriting any
4+
existing figures. Please add a line to this file for any additional
5+
requirements necessary to generate a new figure.
6+
7+
tex demos:
8+
latex
9+
dvipng

doc/static_figs/make.py

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env python
2+
import sys, os, glob
3+
import matplotlib
4+
import IPython.Shell
5+
matplotlib.rcdefaults()
6+
matplotlib.use('Agg')
7+
8+
mplshell = IPython.Shell.MatplotlibShell('mpl')
9+
10+
def figs():
11+
print 'making figs'
12+
import matplotlib.pyplot as plt
13+
for fname in glob.glob('*.py'):
14+
if fname.split('/')[-1] == __file__.split('/')[-1]: continue
15+
basename, ext = os.path.splitext(fname)
16+
outfile = '../_static/%s.png'%basename
17+
18+
if os.path.exists(outfile):
19+
print ' already have %s'%outfile
20+
continue
21+
else:
22+
print ' building %s'%fname
23+
plt.close('all') # we need to clear between runs
24+
mplshell.magic_run(basename)
25+
plt.savefig(outfile)
26+
print 'all figures made'
27+
28+
29+
def clean():
30+
patterns = ['#*', '*~', '*.png', '*pyc']
31+
for pattern in patterns:
32+
for fname in glob.glob(pattern):
33+
os.remove(fname)
34+
print 'all clean'
35+
36+
37+
38+
def all():
39+
figs()
40+
41+
funcd = {'figs':figs,
42+
'clean':clean,
43+
'all':all,
44+
}
45+
46+
if len(sys.argv)>1:
47+
for arg in sys.argv[1:]:
48+
func = funcd.get(arg)
49+
if func is None:
50+
raise SystemExit('Do not know how to handle %s; valid args are'%(
51+
arg, funcd.keys()))
52+
func()
53+
else:
54+
all()
55+
56+
57+
58+

doc/static_figs/tex_demo.png

22.3 KB
Loading

doc/static_figs/tex_demo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mpl_examples/pylab_examples/tex_demo.py

0 commit comments

Comments
 (0)