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

Skip to content

Commit ce9e7a0

Browse files
committed
added subplots adjust faq to docs
svn path=/trunk/matplotlib/; revision=5588
1 parent ce0c5b3 commit ce9e7a0

4 files changed

Lines changed: 76 additions & 23 deletions

File tree

doc/faq/howto_faq.rst

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,58 @@
11
.. _howto-faq:
22

3-
*********
4-
HOWTO FAQ
5-
*********
3+
*****
4+
Howto
5+
*****
6+
7+
.. _howto-subplots-adjust:
8+
9+
How do I move the edge of my axes area over to make room for my tick labels?
10+
============================================================================
11+
12+
For subplots, you can control the default spacing on the left, right,
13+
bottom, and top as well as the horizontal and vertical spacing between
14+
multiple rows and columns using the
15+
:meth:`matplotlib.figure.Figure.subplots_adjust` method (in pyplot it
16+
is :func:`~matplotlib.pyplot.subplots_adjust`). For example, to move
17+
the bottom of the subplots up to make room for some rotated x tick
18+
labels::
19+
20+
fig = plt.figure()
21+
fig.subplots_adjust(bottom=0.2)
22+
ax = fig.add_subplot(111)
23+
24+
You can control the defaults for these parameters in your
25+
:file:`matplotlibrc` file; see :ref:`customizing-matplotlib`. For
26+
example, to make the above setting permanent, you would set::
27+
28+
figure.subplot.bottom : 0.2 # the bottom of the subplots of the figure
29+
30+
The other parameters you can configure are, with their defaults
31+
32+
*left* = 0.125
33+
the left side of the subplots of the figure
34+
*right* = 0.9
35+
the right side of the subplots of the figure
36+
*bottom* = 0.1
37+
the bottom of the subplots of the figure
38+
*top* = 0.9
39+
the top of the subplots of the figure
40+
*wspace* = 0.2
41+
the amount of width reserved for blank space between subplots
42+
*hspace* = 0.2
43+
the amount of height reserved for white space between subplots
44+
45+
If you want additional control, you can create an
46+
:class:`~matplotlib.axes.Axes` using the
47+
:func:`~matplotlib.pyplot.axes` command (or equivalently the figure
48+
:meth:`matplotlib.figure.Figure.add_axes` method), which allows you to
49+
specify the location explicitly::
50+
51+
ax = fig.add_axes([left, bottom, width, height])
52+
53+
where all values are in fractional (0 to 1) coordinates. See
54+
`axes_demo.py <http://matplotlib.sf.net/examples/axes_demo.py>`_ for
55+
an example of placing axes manually.
656

757
.. _howto-ticks:
858

doc/faq/installing_faq.rst

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

3-
******************
4-
Installation FAQ
5-
******************
3+
*************
4+
Installation
5+
*************
6+
67

78

89
How do I report a compilation problem?
@@ -147,11 +148,13 @@ addition, some of the user interfaces support other rendering engines.
147148
For example, with GTK, you can also select GDK rendering (backend
148149
``GTK``) or Cairo rendering (backend ``GTKCairo``).
149150

150-
For the rendering engines, one can also distinguish between vector or
151-
raster renderers. Vector issue drawing commands like "draw a line
152-
from this point to this point" and hence are scale free, and raster
153-
backends generate a pixel represenation of the line whose accuracy
154-
depends on a DPI setting.
151+
For the rendering engines, one can also distinguish between `vector
152+
<http://en.wikipedia.org/wiki/Vector_graphics>`_ or `raster
153+
<http://en.wikipedia.org/wiki/Raster_graphics>`_ renderers. Vector
154+
graphics languages issue drawing commands like "draw a line from this
155+
point to this point" and hence are scale free, and raster backends
156+
generate a pixel represenation of the line whose accuracy depends on a
157+
DPI setting.
155158

156159
Here is a summary of the matplotlib renderers (there is an eponymous
157160
backed for each):
@@ -172,7 +175,7 @@ SVG :term:`svg` :term:`vector graphics` --
172175
:term:`pdf`
173176
:term:`svg`
174177
...
175-
:term:`GDK` :term:`png` :term:`raster graphics` --
178+
:term:`GDK` :term:`png` :term:`raster graphics` --
176179
:term:`jpg` the `Gimp Drawing Kit`_
177180
:term:`tiff`
178181
...

doc/faq/troubleshooting_faq.rst

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

3-
*******************
4-
Troubleshooting FAQ
5-
*******************
3+
***************
4+
Troubleshooting
5+
***************
66

77
.. _matplotlib-version:
88

doc/glossary/index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Glossary
1313

1414
Cairo
1515
The Cairo graphics engine
16-
16+
1717
EPS
1818
Encapsulated Postscript
1919

2020
FLTK
2121
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for
2222
UNIX/Linux (X11), Microsoft Windows, and MacOS X
23-
23+
2424
GDK
2525
The Gimp Drawing Kit for GTK+
2626

@@ -32,7 +32,7 @@ Glossary
3232

3333
PDF
3434
Adobe's Portable Document Format
35-
35+
3636
PNG
3737
PNG stands for Portable Network Graphics, a raster graphics format that
3838
employs lossless data compression which is more suitable for line art
@@ -45,16 +45,16 @@ Glossary
4545
Qt
4646
Qt is a cross-platform application framework for desktop and embedded
4747
development.
48-
48+
4949
Qt4
5050
Qt4 is the most recent version of Qt cross-platform application framework
5151
for desktop and embedded development.
52-
52+
5353
raster graphics
5454
Raster graphics, or bitmaps, represent an image as an array of pixels
5555
which is resolution dependent. Raster graphics are generally most
5656
practical for photo-realistic images, but do not scale easily without
57-
loss of quality.
57+
loss of quality. See `raster graphics <http://en.wikipedia.org/wiki/Raster_graphics>`_
5858

5959
SVG
6060
The Scalable Vector Graphics format.
@@ -69,12 +69,12 @@ Glossary
6969

7070
wxWidgets
7171
A cross-platform GUI and tools library for GTK, MS Windows, and MacOS.
72-
72+
7373
vector graphics
7474
The use of geometrical primitives based upon mathematical equations to
7575
represent images in computer graphics. Primitives can include points,
7676
lines, curves, and shapes or polygons. Vector graphics are scalable,
7777
which means that they can be resized without suffering from issues
7878
related to inherent resolution like are seen in raster graphics. Vector
7979
graphics are generally most practical for typesetting and graphic design
80-
applications.
80+
applications. See `vector graphics <http://en.wikipedia.org/wiki/Vector_graphics>`_

0 commit comments

Comments
 (0)