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

Skip to content

Commit 88f661c

Browse files
committed
minor formatting tweaks
svn path=/trunk/matplotlib/; revision=6224
1 parent 2e5266b commit 88f661c

3 files changed

Lines changed: 26 additions & 16 deletions

File tree

examples/api/logo2.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
import matplotlib.mlab as mlab
1010
from pylab import rand
1111

12-
mpl.rcParams['xtick.labelsize'] = 6
13-
mpl.rcParams['ytick.labelsize'] = 6
12+
mpl.rcParams['xtick.labelsize'] = 10
13+
mpl.rcParams['ytick.labelsize'] = 12
1414
mpl.rcParams['axes.edgecolor'] = 'gray'
1515

1616

1717
axalpha = 0.05
1818
#figcolor = '#EFEFEF'
1919
figcolor = 'white'
2020
dpi = 80
21-
fig = plt.figure(figsize=(6, 1.),dpi=dpi)
21+
fig = plt.figure(figsize=(6, 1.1),dpi=dpi)
2222
fig.figurePatch.set_edgecolor(figcolor)
2323
fig.figurePatch.set_facecolor(figcolor)
2424

@@ -43,29 +43,40 @@ def add_math_background():
4343
return ax
4444

4545
def add_matplotlib_text(ax):
46-
ax.text(0.975, 0.5, 'matplotlib', color='#11557c', fontsize=65,
46+
ax.text(0.95, 0.5, 'matplotlib', color='#11557c', fontsize=65,
4747
ha='right', va='center', alpha=1.0, transform=ax.transAxes)
4848

4949
def add_polar_bar():
50-
ax = fig.add_axes([0.05, 0.1, 0.2, 0.8], polar=True)
50+
ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], polar=True)
51+
52+
5153
ax.axesPatch.set_alpha(axalpha)
54+
ax.set_axisbelow(True)
5255
N = 7
5356
arc = 2. * np.pi
5457
theta = np.arange(0.0, arc, arc/N)
55-
radii = 10 * np.array([0.2, 0.6, 1.0, 0.7, 0.4, 0.5, 0.8])
58+
radii = 10 * np.array([0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8])
5659
width = np.pi / 4 * np.array([0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3])
5760
bars = ax.bar(theta, radii, width=width, bottom=0.0)
5861
for r, bar in zip(radii, bars):
5962
bar.set_facecolor(cm.jet(r/10.))
6063
bar.set_alpha(0.6)
6164

65+
for label in ax.get_xticklabels() + ax.get_yticklabels():
66+
label.set_visible(False)
67+
68+
for line in ax.get_ygridlines() + ax.get_xgridlines():
69+
line.set_lw(0.8)
70+
line.set_alpha(0.9)
71+
line.set_ls('-')
72+
line.set_color('0.5')
73+
74+
ax.set_yticks(np.arange(1, 9, 2))
75+
ax.set_rmax(9)
76+
6277
if __name__ == '__main__':
6378
main_axes = add_math_background()
6479
add_polar_bar()
65-
# add_histogram()
66-
# add_scatter()
67-
# add_pcolor()
68-
#add_pcolor2()
6980
add_matplotlib_text(main_axes)
7081
fig.savefig('logo2.png', facecolor=figcolor, edgecolor=figcolor, dpi=dpi)
7182
plt.show()

lib/matplotlib/axes.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,7 +3414,7 @@ def acorr(self, x, **kwargs):
34143414
34153415
*maxlags* is a positive integer detailing the number of lags
34163416
to show. The default value of *None* will return all
3417-
:math:`2 \mathrm{len}(x) - 1`` lags.
3417+
:math:`2 \mathrm{len}(x) - 1` lags.
34183418
34193419
The return value is a tuple (*lags*, *c*, *linecol*, *b*)
34203420
where
@@ -3425,9 +3425,8 @@ def acorr(self, x, **kwargs):
34253425
- *b* is the *x*-axis.
34263426
34273427
.. seealso::
3428-
:meth:`~matplotlib.axes.Axes.plot` or
3429-
:meth:`~matplotlib.axes.Axes.vlines`:
3430-
For documentation on valid kwargs.
3428+
:meth:`~matplotlib.axes.Axes.plot` or :meth:`~matplotlib.axes.Axes.vlines`:
3429+
For documentation on valid kwargs.
34313430
34323431
**Example:**
34333432

lib/matplotlib/mlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ def load(fname,comments='#',delimiter=None, converters=None,skiprows=0,
12711271
dtype, the array will have this dtype. default: numpy.float_
12721272
12731273
.. seealso::
1274-
See :file:`examples/load_demo.py` in the source tree:
1274+
See :file:`examples/pylab_examples/load_converter.py` in the source tree:
12751275
Exercises many of these options.
12761276
"""
12771277

@@ -2414,7 +2414,7 @@ def rec2csv(r, fname, delimiter=',', formatd=None, missing='',
24142414
files is automatic, if the filename ends in .gz
24152415
24162416
.. seealso::
2417-
:func:`csv2rec` and :func:`rec2csv`:
2417+
:func:`csv2rec`:
24182418
For information about *missing* and *missingd*, which can
24192419
be used to fill in masked values into your CSV file.
24202420
"""

0 commit comments

Comments
 (0)